TPAExtractBoxes
From SCAR Divi Manual
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)