DotFilters

Methods to handle DotFilters. Dot filters are filters that filter in or out EDots.


type TDotFilter

TDotFilter = record
  Bounds: TPointArray;
  Circle: TCircle;
  Inside: Boolean;

  Timeout: Boolean;
  Timer: TCountDown;
end;

Type used to filter minimap dots.


TDotFilter.Create

function TDotFilter.Create(const bounds: TPolygon; const circle: TCircle; inside: Boolean; time: Integer = -1): TDotFilter; static;

Static method to create a TDotFilter.


TDotFilter.IsExpired

function TDotFilter.IsExpired(): Boolean;

Checks if a TDotFilter is already expired by checking it’s timer.


TDotFilter.IsValid

function TDotFilter.IsValid(const pt: TPoint): Boolean;

Checks if pt is valid accordint to the current TDotFilter;


type TDotFilterArray

Type used to manage and interact with arrays of TDotFilters.


TDotFilterArray.Setup

procedure TDotFilterArray.Setup(const bounds: TPolygon; const circle: TCircle; inside: Boolean; time: Integer = -1);
procedure TDotFilterArray.SetupBounds(const bounds: TPolygon; inside: Boolean; time: Integer = -1);
procedure TDotFilterArray.SetupCircle(const circle: TCircle; inside: Boolean; time: Integer = -1);

Creates and adds a TDotFilter to the current TDotFilterArray.


TDotFilterArray.ClearExpired

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

function TDotFilterArray.IsValid(const pt: TPoint; clearExpired: Boolean = True): Boolean;

Checks if a pt 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

function TDotFilterArray.FilterDots(const dots: TPointArray; clearExpired: Boolean): TPointArray;

Filter the dots/points passed into this according to our current TDotFilters.


TMinimap.GetFilteredDot

function TMinimap.GetFilteredDotArray(dots: EDots; filters: TDotFilterArray; clearExpired: Boolean): TPointArray;
function TMinimap.GetFilteredDot(dots: EDots; filters: TDotFilterArray; clearExpired: Boolean): TPoint;

Retrieves and filters minimap dots according to the specified TDotFilters.