Difference between revisions of "CopyTPAEx"

From SCAR Divi Manual
Jump to: navigation, search
(Created page with "==Definition== <source lang="scar" lines="false"> function CopyTPAEx(const TPA: TPointArray; const Index, Count: Integer): TPointArray; </source> ==Availability== SCAR Divi 3.28...")
 
 
Line 18: Line 18:
 
   TPA := [Point(5, 6), Point(0, 0), Point(1, 1), Point(2, 4), Point(6, 9)];
 
   TPA := [Point(5, 6), Point(0, 0), Point(1, 1), Point(2, 4), Point(6, 9)];
 
   TPA2 := CopyTPAEx(TPA, 2, 2);
 
   TPA2 := CopyTPAEx(TPA, 2, 2);
   WriteLn('TPointArray: ' + TPAToStr(TPA2));
+
   WriteLn(TPAToStr(TPA2));
 
end.
 
end.
 
</source>
 
</source>
  
 
Output:
 
Output:
  TPointArray: (1,1);(2,4)
+
  (1,1);(2,4)
  
 
==See Also==
 
==See Also==

Latest revision as of 16:56, 12 December 2012

Definition

function CopyTPAEx(const TPA: TPointArray; const Index, Count: Integer): TPointArray;

Availability

SCAR Divi 3.28 > Current

Description

Creates a new TPointArray with a copy of every element in the given array TPA starting at Index with a length of Count.

Example

var
  TPA, TPA2: TPointArray;

begin
  TPA := [Point(5, 6), Point(0, 0), Point(1, 1), Point(2, 4), Point(6, 9)];
  TPA2 := CopyTPAEx(TPA, 2, 2);
  WriteLn(TPAToStr(TPA2));
end.

Output:

(1,1);(2,4)

See Also