Difference between revisions of "ATPABounds"
From SCAR Divi Manual
(Created page with "==Definition== <source lang="scar" lines="false"> function ATPABounds(const ATPA: T2DPointArray): TBox; </source> ==Availability== SCAR Divi 3.28 > Current ==Description== This...") |
(No difference)
|
Latest revision as of 03:50, 23 October 2011
Definition
function ATPABounds(const ATPA: T2DPointArray): TBox;
Availability
SCAR Divi 3.28 > Current
Description
This function calculates the bounds of a given T2DPointArray ATPA by searching the most outer coordinates of a box which can contain all of the points and returns that box as a TBox.
Example
var
ATPA: T2DPointArray;
Box: TBox;
begin
SetLength(ATPA, 3);
ATPA[0] := [];
ATPA[1] := [Point(1, 1), Point(2, 2)];
ATPA[2] := [Point(5, 10)];
Box := ATPABounds(ATPA);
WriteLn('Box(' + IntToStr(Box.x1) + ',' + IntToStr(Box.y1) + ',' +
IntToStr(Box.x2) + ',' + IntToStr(Box.y2) + ')');
end.Output:
Box(1,1,5,10)