Difference between revisions of "OffsetTPA"

From SCAR Divi Manual
Jump to: navigation, search
(Created page with "==Definition== <source lang="scar" lines="false"> procedure OffsetTPA(var TPA: TPointArray; const XOffset, YOffset: Integer); </source> ==Availability== SCAR Divi 3.28 > Current...")
 
 
Line 18: Line 18:
 
   TPA := [Point(5, 6), Point(0, 0), Point(1, 1)];
 
   TPA := [Point(5, 6), Point(0, 0), Point(1, 1)];
 
   OffsetTPA(TPA, 3, 2);
 
   OffsetTPA(TPA, 3, 2);
   WriteLn('TPointArray: ' + TPAToStr(TPA));
+
   WriteLn(TPAToStr(TPA));
 
end.
 
end.
 
</source>
 
</source>
  
 
Output:
 
Output:
  TPointArray: (8,8);(3,2);(4,3)
+
  (8,8);(3,2);(4,3)
 +
 
 +
==See Also==
 +
*[[OffsetATPA]]
  
 
[[Category:Functions]]
 
[[Category:Functions]]
 
[[Category:TPA Functions]]
 
[[Category:TPA Functions]]
 
[[Category:Array Functions]]
 
[[Category:Array Functions]]

Latest revision as of 19:03, 24 October 2011

Definition

procedure OffsetTPA(var TPA: TPointArray; const XOffset, YOffset: Integer);

Availability

SCAR Divi 3.28 > Current

Description

Offsets the points a given TPointArray TPA by XOffset for the x component and YOffset for the y component.

Example

var
  TPA: TPointArray;

begin
  TPA := [Point(5, 6), Point(0, 0), Point(1, 1)];
  OffsetTPA(TPA, 3, 2);
  WriteLn(TPAToStr(TPA));
end.

Output:

(8,8);(3,2);(4,3)

See Also