TPAFilterCircle
From SCAR Divi Manual
Definition
procedure TPAFiltersCircle(var TPA: TPointArray; const Center: TPoint; const Radius: Extended);
Availability
SCAR Divi 3.33 > Current
Description
Filters points from a given TPointArray TPA by removing all points that are inside of the given circle area. Center determines the center of the circle and 'Radius represents the radius from the center you wish to extract.
Example
var TPA: TPointArray; begin TPA := [Point(0, 0), Point(2, 2), Point(2, 3), Point(5, 10)]; WriteLn(TPAToStr(TPA)); TPAFilterCircle(TPA, Point(0, 0), 4); WriteLn('Filtered: ' + TPAToStr(TPA)); end.
Output:
(0,0);(2,2);(2,3);(5,10) Filtered: (5,10)