RotateTPA
From SCAR Divi Manual
Definition
procedure RotateTPA(const TPA: TPointArray; const Center: TPoint; const Angle: Extended);
Availability
SCAR Divi 3.28 > Current
Description
Rotates all points in a given TPointArray TPA around a TPoint Center by an angle defined in radians in Angle.
Example
var TPA: TPointArray; begin TPA := [Point(1, 1), Point(-1, 1), Point(2, 0)]; RotateTPA(TPA, Point(0, 0), Pi / 2); WriteLn(TPAToStr(TPA)); TPA := [Point(1, 1), Point(-1, 1), Point(2, 0)]; RotateTPA(TPA, Point(0, 1), Pi / 2); WriteLn(TPAToStr(TPA)); end.
Output:
(-1,1);(-1,-1);(0,2) (0,2);(0,0);(1,3)