TPointArray

Methods relating to point arrays.


TPointArray.Difference

function TPointArray.Difference(Other: TPointArray): TPointArray;

TPointArray.SymmetricDifference

function TPointArray.SymmetricDifference(Other: TPointArray): TPointArray;

TPointArray.Intersection

function TPointArray.Intersection(Other: TPointArray): TPointArray;

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.Equals

function TPointArray.Equals(Other: TPointArray): Boolean;

TPointArray.Offset

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

TPointArray.Offset

function TPointArray.Offset(X, Y: Integer): 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.Mean

function TPointArray.Mean: TPoint;

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.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 inside the Points array.


TPointArray.ExcludePolygon

function TPointArray.ExcludePolygon(Polygon: TPointArray): 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: TPointArray): 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: TPointArray;

TPointArray.ShapeFill

function TPointArray.ShapeFill: TPointArray;

TPointArray.Unique

function TPointArray.Unique: TPointArray; override;

TPointArray.Split

function TPointArray.Split(Dist: Integer): T2DPointArray;

TPointArray.Split

function TPointArray.Split(DistX, DistY: Integer): T2DPointArray;

TPointArray.Cluster

function TPointArray.Cluster(Dist: Integer): T2DPointArray;

TPointArray.Cluster

function TPointArray.Cluster(DistX, DistY: Integer): T2DPointArray;

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.DouglasPeucker

function TPointArray.DouglasPeucker(epsilon: Double): TPointArray;

TPointArray.ConcaveHull

function TPointArray.ConcaveHull(Epsilon:Double=2.5; kCount:Int32=5): TPointArray;

TPointArray.ConcaveHullEx

function TPointArray.ConcaveHullEx(MaxLeap: Double=-1; Epsilon:Double=2): T2DPointArray;

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