TQuad¶
The TQuad type is a record which stores four TPoints (Top, Right, Bottom, Left)
See: https://en.wikipedia.org/wiki/Quadrilateral
Top
is the “most” top point (lowest Y)Right
is the “most” right point (highest X)Bottom
is the “most” bottom point (highest Y)Left
is the “most” left point (lowest X)
TQuad.Create¶
function TQuad.Create(ATop, ARight, ABottom, ALeft: TPoint): TQuad; static;
TQuad.Create¶
function TQuad.Create(Box: TBox): TQuad; static;
TQuad.Create¶
function TQuad.Create(Points: TPointArray): TQuad; static;
TQuad.Rotate¶
function TQuad.Rotate(Angle: Double): TQuad;
TQuad.Contains¶
function TQuad.Contains(P: TPoint): Boolean;
TQuad.Offset¶
function TQuad.Offset(P: TPoint): TQuad;
TQuad.Extract¶
function TQuad.Extract(Points: TPointArray): TPointArray;
Returns all points that are in the quad.
TQuad.Exclude¶
function TQuad.Exclude(Points: TPointArray): TPointArray;
Returns all points that are not inside the quad.
TQuad.Expand¶
function TQuad.Expand(Amount: Double): TQuad;
TQuad.NearestEdge¶
function TQuad.NearestEdge(P: TPoint): TPoint;
TQuad.Normalize¶
function TQuad.Normalize: TQuad;
TQuad.RandomPoint¶
function TQuad.RandomPoint: TPoint;
Returns a completely random point in the quad.
TQuad.RandomPointCenter¶
function TQuad.RandomPointCenter: TPoint;
Returns a random point in the quad which is weighted torwards the quad’s center.
TQuad.Area¶
property TQuad.Area: Integer;
TQuad.Corners¶
property TQuad.Corners: TPointArray;
TQuad.Bounds¶
property TQuad.Bounds: TBox;
TQuad.ShortSideLen¶
property TQuad.ShortSideLen: Integer;
TQuad.LongSideLen¶
property TQuad.LongSideLen: Integer;
TQuad.Mean¶
property TQuad.Mean: TPoint;
in¶
operator in(Left: TPoint; Right: TQuad): Boolean;