TPAExtractBoxes

From SCAR Divi Manual
Revision as of 13:03, 21 November 2012 by Freddy (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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