TPAFromTriangle

From SCAR Divi Manual
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