Difference between revisions of "ReverseATPA"

From SCAR Divi Manual
Jump to: navigation, search
(See Also)
Line 34: Line 34:
 
==See Also==
 
==See Also==
 
*[[SortATPA]]
 
*[[SortATPA]]
*[[SortATPAFrom]]
+
*[[SortATPAEx]]
  
 
[[Category:Functions]]
 
[[Category:Functions]]
 
[[Category:TPA Functions]]
 
[[Category:TPA Functions]]
 
[[Category:Array Functions]]
 
[[Category:Array Functions]]

Revision as of 23:41, 23 October 2011

Definition

procedure InvertATPA(var ATPA: T2DPointArray);

Availability

SCAR Divi 3.28 > Current

Description

This function inverts a given T2DPointArray ATPA by reversing the order of the arrays contained in within it.

Example

var
  ATPA: T2DPointArray;
  i: Integer;

begin
  SetLength(ATPA, 3);
  ATPA[0] := [Point(1, 6), Point(5, 4), Point(1, 5)];
  ATPA[1] := [Point(1, 1), Point(2, 2)];
  ATPA[2] := [Point(5, 10)];
  InvertATPA(ATPA);
  for i := 0 to High(ATPA) do
    WriteLn(TPAToStr(ATPA[i]));
end.

Output:

(5,10)
(1,1);(2,2)
(1,6);(5,4);(1,5)

See Also