Difference between revisions of "TPAExtractBoxes"

From SCAR Divi Manual
Jump to: navigation, search
(Created page with "==Definition== <source lang="scar" lines="false"> procedure TPAExtractBoxes(var TPA: TPointArray; const Boxes: TBoxArray); </source> ==Availability== SCAR Divi 3.28 > Current =...")
 
 
Line 31: Line 31:
 
==See Also==
 
==See Also==
 
*[[TPAFilterBoxes]]
 
*[[TPAFilterBoxes]]
 +
*[[TPAExtractCircle]]
 +
*[[TPAExtractTriangle]]
 
*[[TPAExtractPie]]
 
*[[TPAExtractPie]]
  

Latest revision as of 13:03, 21 November 2012

Definition

procedure TPAExtractBoxes(var TPA: TPointArray; const Boxes: TBoxArray);

Availability

SCAR Divi 3.28 > Current

Description

Extracts all points from a given TPointArray TPA by removing all points that fall outside the bounds of any of the boxes specified in the TBoxArray Boxes.

Example

var
  TPA: TPointArray;
  TBA: TBoxArray;

begin
  TPA := [Point(0, 0), Point(2, 2), Point(2, 3), Point(5, 10)];
  TBA := [IntToBox(0, 0, 2, 2)];
  WriteLn(TPAToStr(TPA));
  TPAExtractBoxes(TPA, TBA);
  WriteLn('Extracted: ' + TPAToStr(TPA));
end.

Output:

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

See Also