TPAFromTriangle

From SCAR Divi Manual
Revision as of 14:15, 21 November 2012 by Freddy (talk | contribs) (Created page with "==Definition== <source lang="scar" lines="false"> function TPAFromTriangle(const X1, Y1, X2, Y2, X3, Y3: Integer): TPointArray; </source> ==Availability== SCAR Divi 3.35 > Cu...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Definition

function TPAFromTriangle(const X1, Y1, X2, Y2, X3, Y3: Integer): TPointArray;

Availability

SCAR Divi 3.35 > Current

Description

Generates a TPointArray containing all coordinates within the given triangle, defined by the corner points (X1, Y1), (X2, Y2) and (X3, Y3). The coordinates are stored row-by-row in the TPointArray.

Example

begin
  WriteLn('TPointArray[' + TPAToStr(TPAFromTriangle(0, 3, 0, 0, 3, 0)) + ']');
end.

Output:

TPointArray[(1,0);(2,0);(3,0);(1,1);(2,1);(1,2)]

See Also