TPAExtractCircle

From SCAR Divi Manual
Revision as of 23:18, 28 March 2012 by Freddy (talk | contribs) (Created page with "==Definition== <source lang="scar" lines="false"> procedure TPAExtractCircle(var TPA: TPointArray; const Center: TPoint; const Radius: Extended); </source> ==Availability== SCAR...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Definition

procedure TPAExtractCircle(var TPA: TPointArray; const Center: TPoint; const Radius: Extended);

Availability

SCAR Divi 3.33 > Current

Description

Extracts points from a given TPointArray TPA by removing all points that are not 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));
  TPAExtractCircle(TPA, Point(0, 0), 4);
  WriteLn('Extracted: ' + TPAToStr(TPA));
end.

Output:

(0,0);(2,2);(2,3);(5,10)
Extracted: (0,0);(2,2);(2,3)

See Also