Difference between revisions of "TPAArea"
From SCAR Divi Manual
(Created page with "==Definition== <source lang="scar" lines="false"> function TPAArea(const TPA: TPointArray): Integer; </source> ==Availability== SCAR Divi 3.26 > Current ==Description== Returns...") |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
<source lang="scar" lines="false"> | <source lang="scar" lines="false"> | ||
function TPAArea(const TPA: TPointArray): Integer; | function TPAArea(const TPA: TPointArray): Integer; | ||
+ | </source> | ||
+ | |||
+ | ===Source Code=== | ||
+ | <source lang="scar"> | ||
+ | function TPAArea(const TPA: TPointArray): Integer; | ||
+ | var | ||
+ | w, h: Integer; | ||
+ | begin | ||
+ | TPADimensions(TPA, w, h); | ||
+ | Result := w * h; | ||
+ | end; | ||
</source> | </source> | ||
Latest revision as of 14:57, 3 July 2011
Definition
function TPAArea(const TPA: TPointArray): Integer;
Source Code
function TPAArea(const TPA: TPointArray): Integer; var w, h: Integer; begin TPADimensions(TPA, w, h); Result := w * h; end;
Availability
SCAR Divi 3.26 > Current
Description
Returns the size of the area covered by a given TPointArray TPA.
Example
begin WriteLn(TPAArea([Point(0, 0), Point(1, 2), Point(5, 4)])); end.
Output:
30