# DotFilters Methods to handle DotFilters. Dot filters are filters that filter in or out ERSMinimapDots. - - - (TRSDotFilter)= ## type TRSDotFilter ```pascal TRSDotFilter = record Bounds: TPointArray; Circle: TCircle; Inside: Boolean; Timeout: Boolean; Timer: TCountDown; end; ``` Type used to filter minimap dots. - - - ## TRSDotFilter.Create ```pascal function TRSDotFilter.Create(bounds: TPointArray; c: TCircle; inside: Boolean; time: Int32 = -1): TRSDotFilter; static; ``` Static method to create a TRSDotFilter. - - - ## TRSDotFilter.IsExpired ```pascal function TRSDotFilter.IsExpired(): Boolean; ``` Checks if a TRSDotFilter is already expired by checking it's timer. - - - ## TRSDotFilter.IsValid ```pascal function TRSDotFilter.IsValid(p: TPoint): Boolean; ``` Checks if a point is valid accordint to the current TRSDotFilter; - - - ## TRSDotFilter.Draw ```pascal procedure TRSDotFilter.Draw(out bitmap: TMufasaBitmap); ``` Internal method to draw the current dot filter on a bitmap for debugging. You can see this in action by calling `Debug(TRSDotFilter)`. - - - (TRSDotFilterArray)= ## type TRSDotFilterArray Type used to manage and interact with arrays of TRSDotFilters. - - - ## TRSDotFilterArray.Setup ```pascal procedure TRSDotFilterArray.Setup(bounds: TPointArray; circle: TCircle; inside: Boolean; time: Int32 = -1); procedure TRSDotFilterArray.SetupBounds(bounds: TPointArray; inside: Boolean; time: Int32 = -1); procedure TRSDotFilterArray.SetupCircle(circle: TCircle; inside: Boolean; time: Int32 = -1); ``` Creates and adds a TRSDotFilter to the current TRSDotFilterArray. - - - ## TRSDotFilterArray.ClearExpired ```pascal procedure TRSDotFilterArray.ClearExpired(); ``` Clears expired TRSDotFilter from the current TRSDotFilterArray. You usually don't need to call this directly, but you can if you want. Other methods already take care of this by default for you regardless. - - - ## TRSDotFilterArray.IsValid ```pascal function TRSDotFilterArray.IsValid(dot: TPoint; clearExpired: Boolean = True): Boolean; ``` Checks if a dot/point is valid in any of the TRSDotFilters in the current array. By default, expired TRSDotFilters are cleared from the array while this runs. - - - ## TRSDotFilterArray.FilterDots ```pascal function TRSDotFilterArray.FilterDots(dots: TPointArray): TPointArray; ``` Filter the dots/points passed into this according to our current TRSDotFilters. - - - ## TRSDotFilterArray.Draw ```pascal procedure TRSDotFilterArray.Draw(out bitmap: TMufasaBitmap); ``` Internal method for drawing the TRSDotFilterArray on a bitmap for debugging. You can see this in action by calling `Debug(TRSDotFilterArray)` - - - ## TRSMinimap.GetFilteredDot ```pascal function TRSMinimap.GetFilteredDotArray(dot: ERSMinimapDot; dotFilters: TRSDotFilterArray): TPointArray; function TRSMinimap.GetFilteredDot(dot: ERSMinimapDot; dotFilters: TRSDotFilterArray): TPoint; ``` Retrieves and filters minimap dots according to the specified TRSDotFilters. - - - ## Debug ```pascal procedure Debug(filter: TRSDotFilter); overload; procedure Debug(filterArray: TRSDotFilterArray); overload; ``` Debugs a TRSDotFilter or TRSDotFilterArray on the client.