Difference between revisions of "TPAInvert"

From SCAR Divi Manual
Jump to: navigation, search
(Created page with "==Definition== <source lang="scar" lines="false"> procedure TPAInvert(var TPA: TPointArray); </source> ==Availability== SCAR Divi 3.26 > Current ===Aliases=== *InvertTPA (SCAR ...")
 
(Example)
Line 17: Line 17:
 
var
 
var
 
   TPA: TPointArray;
 
   TPA: TPointArray;
  MiddlePoint: TPoint;
 
 
    
 
    
 
begin
 
begin

Revision as of 01:01, 27 June 2011

Definition

procedure TPAInvert(var TPA: TPointArray);

Availability

SCAR Divi 3.26 > Current

Aliases

  • InvertTPA (SCAR Divi 3.20b > Current)

Description

This function inverts a given TPointArray TPA by reversing the order of the coordinates contained in within it.

Example

var
  TPA: TPointArray;
  
begin
  TPA := [Point(0, 0), Point(2, 2), Point(5, 10)];
  TPAInvert(TPA);
  WriteLn('TPointArray: ' + TPAToStr(TPA));
end.

Output:

TPointArray: (5,10);(2,2);(0,0)

See Also