Point¶
The TPoint type is a record which defines a X,Y integer coordinate.
Point¶
function Point(X, Y: Integer): TPoint;
TPoint.Create¶
function TPoint.Create(X, Y: Integer): TPoint; static;
TPoint.DistanceTo¶
function TPoint.DistanceTo(Other: TPoint): Double;
TPoint.Rotate¶
function TPoint.Rotate(Radians: Double; Center: TPoint): TPoint;
TPoint.Magnitude¶
function TPoint.Magnitude: Double;
TPoint.AngleBetween¶
function TPoint.AngleBetween(Other: TPoint): Double;
TPoint.Offset¶
function TPoint.Offset(X, Y: Integer): TPoint;
TPoint.Offset¶
function TPoint.Offset(P: TPoint): TPoint;
TPoint.Random¶
function TPoint.Random(Min, Max: Integer): TPoint;
TPoint.Random¶
function TPoint.Random(Value: Integer): TPoint;
TPoint +¶
operator + (L, R: TPoint): TPoint;
TPoint +=¶
operator += (var L: TPoint; R: TPoint): TPoint;
TPoint *¶
operator * (L: TPoint; R: Double): TPoint;
TPoint *=¶
operator *= (var L: TPoint; R: Double): TPoint;
TPoint -¶
operator - (L, R: TPoint): TPoint;
TPoint -=¶
operator -= (var L: TPoint; R: TPoint): TPoint;
TPointArray.CreateFromBox¶
function TPointArray.CreateFromBox(Box: TBox; Filled: Boolean): TPointArray; static;
TPointArray.CreateFromEllipse¶
function TPointArray.CreateFromEllipse(Center: TPoint; RadiusX, RadiusY: Integer; Filled: Boolean): TPointArray; static;
TPointArray.CreateFromCircle¶
function TPointArray.CreateFromCircle(Center: TPoint; Radius: Integer; Filled: Boolean): TPointArray; static;
TPointArray.CreateFromLine¶
function TPointArray.CreateFromLine(Start, Stop: TPoint): TPointArray; static;
TPointArray.CreateFromPolygon¶
function TPointArray.CreateFromPolygon(Poly: TPointArray; Filled: Boolean): TPointArray; static;
TPointArray.CreateFromSimplePolygon¶
function TPointArray.CreateFromSimplePolygon(Center: TPoint; Sides: Integer; Size: Integer; Filled: Boolean): TPointArray; static;
TPointArray.CreateFromAxes¶
function TPointArray.CreateFromAxes(X, Y: TIntegerArray): TPointArray; static;
TPointArray.Rows¶
function TPointArray.Rows: T2DPointArray;
TPointArray.Columns¶
function TPointArray.Columns: T2DPointArray;
TPointArray.Offset¶
function TPointArray.Offset(P: TPoint): TPointArray;
TPointArray.FloodFill¶
function TPointArray.FloodFill(const StartPoint: TPoint; const EightWay: Boolean): TPointArray;
TPointArray.Invert¶
function TPointArray.Invert(Bounds: TBox): TPointArray;
TPointArray.Invert¶
function TPointArray.Invert: TPointArray;
TPointArray.Bounds¶
function TPointArray.Bounds: TBox;
TPointArray.ReduceByDistance¶
function TPointArray.ReduceByDistance(Dist: Integer): TPointArray;
TPointArray.PointsNearby¶
function TPointArray.PointsNearby(Other: TPointArray; MinDist, MaxDist: Double): TPointArray;
TPointArray.PointsNearby¶
function TPointArray.PointsNearby(Other: TPointArray; MinDistX, MinDistY, MaxDistX, MaxDistY: Double): TPointArray;
TPointArray.IsPointNearby¶
function TPointArray.IsPointNearby(Other: TPoint; MinDist, MaxDist: Double): Boolean;
TPointArray.IsPointNearby¶
function TPointArray.IsPointNearby(Other: TPoint; MinDistX, MinDistY, MaxDistX, MaxDistY: Double): Boolean;
TPointArray.FurthestPoints¶
procedure TPointArray.FurthestPoints(out A, B: TPoint);
TPointArray.NearestPoint¶
function TPointArray.NearestPoint(Other: TPoint): TPoint;
TPointArray.FurthestPoint¶
function TPointArray.FurthestPoint(Other: TPoint): TPoint;
TPointArray.Density¶
function TPointArray.Density: Double;
TPointArray.Connect¶
function TPointArray.Connect: TPointArray;
TPointArray.Extremes¶
function TPointArray.Extremes: TPointArray;
TPointArray.Rotate¶
function TPointArray.Rotate(Radians: Double; Center: TPoint): TPointArray;
TPointArray.RotateEx¶
function TPointArray.RotateEx(Radians: Double): TPointArray;
TPointArray.Sort¶
function TPointArray.Sort(Weights: TIntegerArray; LowToHigh: Boolean = True): TPointArray;
TPointArray.Sort¶
function TPointArray.Sort(Weights: TDoubleArray; LowToHigh: Boolean = True): TPointArray;
TPointArray.SortByX¶
function TPointArray.SortByX(LowToHigh: Boolean = True): TPointArray;
TPointArray.SortByY¶
function TPointArray.SortByY(LowToHigh: Boolean = True): TPointArray;
TPointArray.SortFrom¶
function TPointArray.SortFrom(From: TPoint): TPointArray;
TPointArray.SortByRow¶
function TPointArray.SortByRow(Reverse: Boolean = False): TPointArray;
TPointArray.SortByColumn¶
function TPointArray.SortByColumn(Reverse: Boolean = False): TPointArray;
TPointArray.ExcludePie¶
function TPointArray.ExcludePie(StartDegree, EndDegree, MinRadius, MaxRadius: Single; Center: TPoint): TPointArray;
Returns all points from Self are not inside the “pie slice” defined by StartDegree, EndDegree and MinRadius, MaxRadius and Center.
Note: Inverse of ExcludePie
TPointArray.ExcludeDist¶
function TPointArray.ExcludeDist(Center: TPoint; MinDist, MaxDist: Double): TPointArray;
Returns all points from Self that are not within MinDist and MaxDist from Center
Note: Inverse of ExtractDist
TPointArray.ExcludePoints¶
function TPointArray.ExcludePoints(Points: TPointArray): TPointArray;
Returns all points from Self that are not in the Points array.
TPointArray.ExcludePolygon¶
function TPointArray.ExcludePolygon(Polygon: TPolygon): TPointArray;
Returns all points from Self that are not inside the polygon.
Note: Inverse of ExtractPolygon
TPointArray.ExcludeBox¶
function TPointArray.ExcludeBox(Box: TBox): TPointArray;
Returns all points from Self that not inside the box.
Note: Inverse of ExtractBox
TPointArray.ExcludeQuad¶
function TPointArray.ExcludeQuad(Quad: TQuad): TPointArray;
Returns all points from Self that not inside the quad.
Note: Inverse of ExtractQuad
TPointArray.ExtractDist¶
function TPointArray.ExtractDist(Center: TPoint; MinDist, MaxDist: Double): TPointArray;
Returns all points from Self that are within MinDist and MaxDist from Center
Note: Inverse of ExtractDist
TPointArray.ExtractPolygon¶
function TPointArray.ExtractPolygon(Polygon: TPolygon): TPointArray;
Returns all points from Self that are inside the polygon.
TPointArray.ExtractBox¶
function TPointArray.ExtractBox(Box: TBox): TPointArray;
Returns all points from Self that are inside the box.
TPointArray.ExtractQuad¶
function TPointArray.ExtractQuad(Quad: TQuad): TPointArray;
Returns all points from Self that are inside the quad.
TPointArray.ExtractPie¶
function TPointArray.ExtractPie(StartDegree, EndDegree, MinRadius, MaxRadius: Single; Center: TPoint): TPointArray;
Returns all points from Self are inside the “pie slice” defined by StartDegree, EndDegree and MinRadius, MaxRadius and Center.
TPointArray.Skeleton¶
function TPointArray.Skeleton(FMin: Integer = 2; FMax: Integer = 6): TPointArray;
TPointArray.Border¶
function TPointArray.Border: TPointArray;
TPointArray.Edges¶
function TPointArray.Edges: TPointArray;
TPointArray.ConvexHull¶
function TPointArray.ConvexHull: TPolygon;
TPointArray.ShapeFill¶
function TPointArray.ShapeFill: TPointArray;
TPointArray.Split¶
function TPointArray.Split(Dist: Single): T2DPointArray;
function TPointArray.Split(DistX, DistY: Single): T2DPointArray;
Groups points into clusters - points within Dist of one another end up in the same cluster.

Note
Cluster produces the same result and should be used.
It’s usually faster and automatically uses Split when it wouldn’t be.
TPointArray.Cluster¶
function TPointArray.Cluster(Dist: Single): T2DPointArray;
function TPointArray.Cluster(DistX, DistY: Single): T2DPointArray;
Groups points into clusters - points within Dist of one another end up in the same cluster.

TPointArray.MinAreaRect¶
function TPointArray.MinAreaRect: TQuad;
TPointArray.MinAreaCircle¶
function TPointArray.MinAreaCircle: TCircle;
TPointArray.Erode¶
function TPointArray.Erode(Iterations: Integer): TPointArray;
TPointArray.Grow¶
function TPointArray.Grow(Iterations: Integer): TPointArray;
TPointArray.Partition¶
function TPointArray.Partition(Dist: Integer): T2DPointArray;
TPointArray.Partition¶
function TPointArray.Partition(Width, Height: Integer): T2DPointArray;
TPointArray.PartitionEx¶
function TPointArray.PartitionEx(BoxWidth, BoxHeight: Integer): T2DPointArray;
TPointArray.PartitionEx¶
function TPointArray.PartitionEx(BoxWidth, BoxHeight: Integer): T2DPointArray;
PartitionEx with StartPoint.
TPointArray.SortCircular¶
function TPointArray.SortCircular(Center: TPoint; StartDegrees: Integer; Clockwise: Boolean): TPointArray;
TPointArray.DistanceTransform¶
function TPointArray.DistanceTransform: TSingleMatrix;
TPointArray.DistanceTransform¶
function TPointArray.DistanceTransform: TSingleMatrix;
TPointArray.Circularity¶
function TPointArray.Circularity: Double;
TPointArray.ConcaveHull¶
function TPointArray.ConcaveHull(Epsilon:Double=2.5; kCount:Int32=5): TPolygon;
TPointArray.ConcaveHullEx¶
function TPointArray.ConcaveHullEx(MaxLeap: Double=-1; Epsilon:Double=2): TPolygonArray;
TPointArray.ConvexityDefects¶
function TPointArray.ConvexityDefects(Epsilon: Single; Mode: EConvexityDefects = EConvexityDefects.NONE): TPointArray;
Finds the defects in relation to a convex hull of the given concave hull.
EConvexityDefects.All -> Keeps all convex points as well.
EConvexityDefects.Minimal -> Keeps the convex points that was linked to a defect
EConvexityDefects.None -> Only defects
T2DPointArray.Offset¶
function T2DPointArray.Offset(P: TPoint): T2DPointArray;
T2DPointArray.Sort¶
function T2DPointArray.Sort(Weights: TIntegerArray; LowToHigh: Boolean = True): T2DPointArray;
T2DPointArray.Sort¶
function T2DPointArray.Sort(Weights: TDoubleArray; LowToHigh: Boolean = True): T2DPointArray;
T2DPointArray.SortFromSize¶
function T2DPointArray.SortFromSize(Size: Integer): T2DPointArray;
T2DPointArray.SortFromIndex¶
function T2DPointArray.SortFromIndex(From: TPoint; Index: Integer = 0): T2DPointArray;
T2DPointArray.SortFromFirstPoint¶
function T2DPointArray.SortFromFirstPoint(From: TPoint): T2DPointArray;
T2DPointArray.SortFromFirstPointX¶
function T2DPointArray.SortFromFirstPointX(From: TPoint): T2DPointArray;
T2DPointArray.SortFromFirstPointY¶
function T2DPointArray.SortFromFirstPointY(From: TPoint): T2DPointArray;
T2DPointArray.SortFrom¶
function T2DPointArray.SortFrom(From: TPoint): T2DPointArray;
T2DPointArray.SortByArea¶
function T2DPointArray.SortByArea(LowToHigh: Boolean): T2DPointArray;
T2DPointArray.SortBySize¶
function T2DPointArray.SortBySize(LowToHigh: Boolean): T2DPointArray;
T2DPointArray.SortByDensity¶
function T2DPointArray.SortByDensity(LowToHigh: Boolean): T2DPointArray;
T2DPointArray.SortByX¶
function T2DPointArray.SortByX(LowToHigh: Boolean): T2DPointArray;
T2DPointArray.SortByY¶
function T2DPointArray.SortByY(LowToHigh: Boolean): T2DPointArray;
T2DPointArray.SortByShortSide¶
function T2DPointArray.SortByShortSide(LowToHigh: Boolean): T2DPointArray;
T2DPointArray.SortByLongSide¶
function T2DPointArray.SortByLongSide(LowToHigh: Boolean): T2DPointArray;
T2DPointArray.ExtractSize¶
function T2DPointArray.ExtractSize(Len: Integer; KeepIf: EComparator): T2DPointArray;
T2DPointArray.ExtractSizeEx¶
function T2DPointArray.ExtractSize(Len: Integer; KeepIf: EComparator): T2DPointArray;
T2DPointArray.ExtractDimensions¶
function T2DPointArray.ExtractDimensions(MinShortSide, MinLongSide, MaxShortSide, MaxLongSide: Integer): T2DPointArray;
T2DPointArray.ExtractDimensionsEx¶
function T2DPointArray.ExtractDimensionsEx(MinShortSide, MinLongSide: Integer): T2DPointArray;
T2DPointArray.ExcludeSize¶
function T2DPointArray.ExcludeSize(Len: Integer; KeepIf: EComparator): T2DPointArray;
T2DPointArray.ExcludeSizeEx¶
function T2DPointArray.ExcludeSize(Len: Integer; KeepIf: EComparator): T2DPointArray;
T2DPointArray.ExcludeDimensions¶
function T2DPointArray.ExcludeDimensions(MinShortSide, MinLongSide, MaxShortSide, MaxLongSide: Integer): T2DPointArray;
T2DPointArray.ExcludeDimensionsEx¶
function T2DPointArray.ExcludeDimensionsEx(MinShortSide, MinLongSide: Integer): T2DPointArray;
T2DPointArray.Smallest¶
function T2DPointArray.Smallest: TPointArray;
T2DPointArray.Largest¶
function T2DPointArray.Largest: TPointArray;
T2DPointArray.Bounds¶
function T2DPointArray.Bounds: TBox;
T2DPointArray.BoundsArray¶
function T2DPointArray.BoundsArray: TBoxArray;
T2DPointArray.Means¶
function T2DPointArray.Means: TPointArray;
T2DPointArray.Merge¶
function T2DPointArray.Merge: TPointArray;
T2DPointArray.Intersection¶
function T2DPointArray.Intersection: TPointArray;
Returns the points which exist in all arrays.