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.Area --------- ``` property TBox.Area: Int64; ``` ----- TBox.Size --------- ``` property TBox.Size: TSize; ``` ----- 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.Contains ------------- ``` function TBox.Contains(Point: TPoint): Boolean; ``` ----- TBox.Partition -------------- ``` function TBox.Partition(Rows, Cols: Integer): TBoxArray; ``` ----- 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 ---------- ``` property TBox.Width: Integer; ``` ----- TBox.Height ----------- ``` property TBox.Height: Integer; ``` ----- TBox.Center ----------- ``` property TBox.Center: TPoint; ``` ----- TBox.Corners ------------ ``` function TBox.Corners: TPointArray; ``` ----- 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. ----- TBox.TopLeft ------------ ``` property TBox.TopLeft: TPoint; ``` ----- TBox.TopRight ------------- ``` property TBox.TopRight: TPoint; ``` ----- TBox.BottomLeft --------------- ``` property TBox.BottomLeft: TPoint; ``` ----- TBox.BottomRight ---------------- ``` property TBox.BottomRight: TPoint; ``` ----- TBoxArray.Create ---------------- ``` function TBoxArray.Create(Start: TPoint; Columns, Rows, Width, Height: Integer; Spacing: TPoint): TBoxArray; static; ``` ----- TBoxArray.Pack -------------- ``` function TBoxArray.Pack: TBoxArray; ``` ----- TBoxArray.SortFrom ------------------ ``` function TBoxArray.SortFrom(From: TPoint): TBoxArray; ``` ----- TBoxArray.SortByX ----------------- ``` function TBoxArray.SortByX(LowToHigh: Boolean): TBoxArray; ``` ----- TBoxArray.SortByY ----------------- ``` function TBoxArray.SortByY(LowToHigh: Boolean; const Result: Pointer): TBoxArray; ``` ----- TBoxArray.SortByWidth --------------------- ``` function TBoxArray.SortByWidth(LowToHigh: Boolean; const Result: Pointer): TBoxArray; ``` ----- TBoxArray.SortByHeight ---------------------- ``` function TBoxArray.SortByHeight(LowToHigh: Boolean; const Result: Pointer): TBoxArray; ``` ----- TBoxArray.SortByArea -------------------- ``` function TBoxArray.SortByArea(LowToHigh: Boolean; const Result: Pointer): TBoxArray; ``` ----- TBoxArray.Merge --------------- ``` function TBoxArray.Merge: TBox; ``` ----- TBoxArray.Centers ----------------- ``` function TBoxArray.Centers: TPointArray; ``` ----- TBoxArray.Offset ---------------- ``` function TBoxArray.Offset(P: TPoint): TBoxArray; ``` ----- TBoxArray.Expand ---------------- ``` function TBoxArray.Expand(SizeMod: Integer): TBoxArray; ``` ----- TBoxArray.Expand ---------------- ``` function TBoxArray.Expand(WidMod, HeiMod: Integer): TBoxArray; ``` ----- TBoxArray.ContainsPoint ----------------------- ``` function TBoxArray.ContainsPoint(P: TPoint): Integer; ``` ----- TBoxArray.Sort -------------- ``` function TBoxArray.Sort(Weights: TIntegerArray; LowToHigh: Boolean = True): TBoxArray ``` ----- TBoxArray.Sort -------------- ``` function TBoxArray.Sort(Weights: TDoubleArray; LowToHigh: Boolean = True): TBoxArray ``` ----- in -- ``` operator in(Left: TPoint; Right: TBox): Boolean; ```