Difference between revisions of "TPABounds"
From SCAR Divi Manual
(Created page with "==Definition== <source lang="scar" lines="false"> function TPABounds(const TPA: TPointArray): TBox; </source> ==Availability== SCAR Divi 3.20 > Current ==Description== This fun...") |
|||
Line 5: | Line 5: | ||
==Availability== | ==Availability== | ||
− | SCAR Divi 3. | + | SCAR Divi 3.26 > Current |
==Description== | ==Description== | ||
Line 11: | Line 11: | ||
==Aliases== | ==Aliases== | ||
− | *GetTPABounds | + | *GetTPABounds (SCAR Divi 3.20 > Current) |
==Example== | ==Example== |
Revision as of 00:44, 27 June 2011
Definition
function TPABounds(const TPA: TPointArray): TBox;
Availability
SCAR Divi 3.26 > Current
Description
This function calculates the bounds of a given TPointArray TPA by searching the most outer coordinates of a box which can contain all of the points and returns that box as a TBox.
Aliases
- GetTPABounds (SCAR Divi 3.20 > Current)
Example
var TPA: TPointArray; Box: TBox; begin TPA := [Point(0, 0), Point(2, 2), Point(5, 10)]; Box := TPaBounds(TPA); WriteLn('Box(' + IntToStr(Box.x1) + ',' + IntToStr(Box.y1) + ',' + IntToStr(Box.x2) + ',' + IntToStr(Box.y2) + ')'); end.
Output:
Box(0,0,5,10)