# DotFilters Methods to handle DotFilters. Dot filters are filters that filter in or out EMinimapDots. - - - (TDotFilter)= ## type TDotFilter ```pascal TDotFilter = record Bounds: TPointArray; Circle: TCircle; Inside: Boolean; Timeout: Boolean; Timer: TCountDown; end; ``` Type used to filter minimap dots. - - - ## TDotFilter.Create ```pascal function TDotFilter.Create(bounds: TPointArray; c: TCircle; inside: Boolean; time: Int32 = -1): TDotFilter; static; ``` Static method to create a TDotFilter. - - - ## TDotFilter.IsExpired ```pascal function TDotFilter.IsExpired(): Boolean; ``` Checks if a TDotFilter is already expired by checking it's timer. - - - ## TDotFilter.IsValid ```pascal function TDotFilter.IsValid(p: TPoint): Boolean; ``` Checks if a point is valid accordint to the current TDotFilter; - - - ## TDotFilter.Draw ```pascal procedure TDotFilter.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(TDotFilter)`. - - - (TDotFilterArray)= ## type TDotFilterArray Type used to manage and interact with arrays of TDotFilters. - - - ## TDotFilterArray.Setup ```pascal procedure TDotFilterArray.Setup(bounds: TPointArray; circle: TCircle; inside: Boolean; time: Int32 = -1); procedure TDotFilterArray.SetupBounds(bounds: TPointArray; inside: Boolean; time: Int32 = -1); procedure TDotFilterArray.SetupCircle(circle: TCircle; inside: Boolean; time: Int32 = -1); ``` Creates and adds a TDotFilter to the current TDotFilterArray. - - - ## TDotFilterArray.ClearExpired ```pascal procedure TDotFilterArray.ClearExpired(); ``` Clears expired TDotFilter from the current TDotFilterArray. 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. - - - ## TDotFilterArray.IsValid ```pascal function TDotFilterArray.IsValid(dot: TPoint; clearExpired: Boolean = True): Boolean; ``` Checks if a dot/point is valid in any of the TDotFilters in the current array. By default, expired TDotFilters are cleared from the array while this runs. - - - ## TDotFilterArray.FilterDots ```pascal function TDotFilterArray.FilterDots(dots: TPointArray): TPointArray; ``` Filter the dots/points passed into this according to our current TDotFilters. - - - ## TDotFilterArray.Draw ```pascal procedure TDotFilterArray.Draw(out bitmap: TMufasaBitmap); ``` Internal method for drawing the TDotFilterArray on a bitmap for debugging. You can see this in action by calling `Debug(TDotFilterArray)` - - - ## TMinimap.GetFilteredDot ```pascal function TMinimap.GetFilteredDotArray(dot: EMinimapDot; dotFilters: TDotFilterArray): TPointArray; function TMinimap.GetFilteredDot(dot: EMinimapDot; dotFilters: TDotFilterArray): TPoint; ``` Retrieves and filters minimap dots according to the specified TDotFilters. - - - ## Debug ```pascal procedure Debug(filter: TDotFilter); overload; procedure Debug(filterArray: TDotFilterArray); overload; ``` Debugs a TDotFilter or TDotFilterArray on the client.