TBox

The TBox type is a record which defines a box from top left and bottom right coords.

  • X1 is the top left X coord

  • Y1 is the top left Y coord

  • X2 is the bottom right X coord

  • Y2 is the bottom right Y coord


Box

function Box(X1, Y1, X2, Y2: Integer): TBox;

Box

function Box(Mid: TPoint; XRad, YRad: Integer): TBox;

TBox.Create

function TBox.Create(X1, Y1, X2, Y2: Integer): TBox; static;

TBox.Create

function TBox.Create(Center: TPoint; XRad, YRad: Integer): TBox; static;

TBox.EqualDimensions

function TBox.EqualDimensions(Other: TBox): Boolean;

TBox.Area

function TBox.Area: Integer;

TBox.Expand

function TBox.Expand(SizeMod: Integer): TBox;

TBox.Expand

function TBox.Expand(WidMod, HeiMod: Integer): TBox;

TBox.Expand

function TBox.Expand(SizeMod: Integer; MaxBounds: TBox): TBox;

TBox.Expand

function TBox.Expand(WidMod, HeiMod: Integer; MaxBounds: TBox): TBox;

TBox.Extract

function TBox.Extract(Points: TPointArray): TPointArray;

Returns all points that are inside the box.

TBox.Exclude

function TBox.Exclude(Points: TPointArray): TPointArray;

Returns all points that are not inside the box.

TBox.Contains

function TBox.Contains(Other: TBox): Boolean;

TBox.Contains

function TBox.Contains(Other: TPoint): Boolean;

TBox.Contains

function TBox.Contains(X, Y: Integer): Boolean;

TBox.Contains

function TBox.Contains(Other: TQuad): Boolean;

TBox.Partition

function TBox.Partition(Rows, Cols: Integer): TBoxArray;

TBox.Offset

function TBox.Offset(X, Y: Integer): TBox;

TBox.Offset

function TBox.Offset(P: TPoint): TBox;

TBox.Combine

function TBox.Combine(Other: TBox): TBox;

TBox.Invert

function TBox.Invert(Space: TBox): TBoxArray;

TBox.NearestEdge

function TBox.NearestEdge(P: TPoint): TPoint;

TBox.Intersect

function TBox.Intersect(P: TPoint): TPoint;

TBox.Clip

function TBox.Clip(Other: TBox): TBox;

TBox.Normalize

function TBox.Normalize: TBox;

TBox.Width

function TBox.Width: Integer;

TBox.Height

function TBox.Height: Integer;

TBox.Center

function TBox.Center: TPoint;

TBox.Corners

function TBox.Corners: TPointArray;

TBox.ToQuad

function TBox.ToQuad: TQuad;

Converts the TBox to a TQuad type.

TBox.RandomPoint

function TBox.RandomPoint: TPoint;

Returns a completely random point in the box.

TBox.RandomPointCenter

function TBox.RandomPointCenter: TPoint;

Returns a random point in the box which is weighted towards the box center.