Difference between revisions of "TPAFromBox"
From SCAR Divi Manual
(Created page with "==Definition== <source lang="scar" lines="false"> function TPAFromBox(const Box: TBox): TPointArray; </source> ==Availability== SCAR Divi 3.26 > Current ==Description== Generat...") |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
==Availability== | ==Availability== | ||
SCAR Divi 3.26 > Current | SCAR Divi 3.26 > Current | ||
+ | |||
+ | ===Notes=== | ||
+ | *Before 3.39, the function did not throw an exception on an invalid box. | ||
==Description== | ==Description== | ||
− | Generates a [[TPointArray]] containing all coordinates within the given [[TBox]] '''Box'''. The | + | Generates a [[TPointArray]] containing all coordinates within the given [[TBox]] '''Box'''. The coordinates are stored row-by-row in the TPointArray. If '''Box''' is invalid (XE > XS and/or YE > XS), the function throws an exception. |
==Example== | ==Example== | ||
Line 19: | Line 22: | ||
Output: | Output: | ||
TPointArray[(3,1);(4,1);(3,2);(4,2);(3,3);(4,3);(3,4);(4,4)] | TPointArray[(3,1);(4,1);(3,2);(4,2);(3,3);(4,3);(3,4);(4,4)] | ||
+ | |||
+ | ==See Also== | ||
+ | *[[TPAFromCircle]] | ||
+ | *[[TPAFromTriangle]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
[[Category:TPA Functions]] | [[Category:TPA Functions]] | ||
[[Category:Array Functions]] | [[Category:Array Functions]] |
Latest revision as of 19:28, 19 January 2013
Definition
function TPAFromBox(const Box: TBox): TPointArray;
Availability
SCAR Divi 3.26 > Current
Notes
- Before 3.39, the function did not throw an exception on an invalid box.
Description
Generates a TPointArray containing all coordinates within the given TBox Box. The coordinates are stored row-by-row in the TPointArray. If Box is invalid (XE > XS and/or YE > XS), the function throws an exception.
Example
begin WriteLn('TPointArray[' + TPAToStr(TPAFromBox(Box(3, 1, 5, 5))) + ']'); end.
Output:
TPointArray[(3,1);(4,1);(3,2);(4,2);(3,3);(4,3);(3,4);(4,4)]