Difference between revisions of "TPAFilterBoxes"
From SCAR Divi Manual
(Created page with "==Definition== <source lang="scar" lines="false"> procedure TPAFilterBoxes(var TPA: TPointArray; const Boxes: TBoxArray); </source> ==Availability== SCAR Divi 3.25 > Current ==...") |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 8: | Line 8: | ||
==Description== | ==Description== | ||
− | Filters a [[TPointArray]] '''TPA'' by removing all included coordinates that fall within the bounds of any of the boxes specified in the [[TBoxArray]] '''Boxes'''. | + | Filters a [[TPointArray]] '''TPA''' by removing all included coordinates that fall within the bounds of any of the boxes specified in the [[TBoxArray]] '''Boxes'''. |
==Example== | ==Example== | ||
Line 28: | Line 28: | ||
Unfiltered TPointArray: (0,0);(2,2);(2,3);(5,10) | Unfiltered TPointArray: (0,0);(2,2);(2,3);(5,10) | ||
Filtered TPointArray: (2,3);(5,10) | Filtered TPointArray: (2,3);(5,10) | ||
+ | |||
+ | ==See Also== | ||
+ | *[[TPAExtractBoxes]] | ||
+ | *[[TPAFilterPie]] | ||
+ | *[[TPAFilterCircle]] | ||
+ | *[[TPAFilterTriangle]] | ||
+ | *[[TPAFilterPoints]] | ||
+ | *[[TPARemovePoint]] | ||
+ | *[[TPARemovePointEx]] | ||
[[Category:Functions]] | [[Category:Functions]] |
Latest revision as of 13:05, 21 November 2012
Definition
procedure TPAFilterBoxes(var TPA: TPointArray; const Boxes: TBoxArray);
Availability
SCAR Divi 3.25 > Current
Description
Filters a TPointArray TPA by removing all included coordinates that fall within 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('Unfiltered TPointArray: ' + TPAToStr(TPA)); TPAFilterBoxes(TPA, TBA); WriteLn('Filtered TPointArray: ' + TPAToStr(TPA)); end.
Output:
Unfiltered TPointArray: (0,0);(2,2);(2,3);(5,10) Filtered TPointArray: (2,3);(5,10)