Skip to content
Member Filters
Show Inherited
Show Protected
Show abstract

TAffineTransformation.Rotate

Applies a 2D rotation in degrees to the current transformation matrix.

Declarations ​

pascal
procedure Rotate(Alpha: TFloat); overload;
procedure Rotate(Cx, Cy, Alpha: TFloat); overload;
Overload Details

Overload 1 ​

pascal
procedure Rotate(Alpha: TFloat); overload;

Rotates coordinates around the origin (0, 0) by Alpha degrees.

ParameterTypeDescription
AlphaTFloatRotation angle in degrees.

Overload 2 ​

pascal
procedure Rotate(Cx, Cy, Alpha: TFloat); overload;

Rotates coordinates around pivot point (Cx, Cy) by Alpha degrees.

ParameterTypeDescription
Cx, CyTFloatPivot point coordinates.
AlphaTFloatRotation angle in degrees.

Description ​

Rotate multiplies the transformation matrix by a 2D rotation matrix for the specified angle in degrees.

At first, the origin is translated to (Cx, Cy), then an Alpha degree rotation is performed around the origin, and finally the origin is translated back.

M=[cos⁡αsin⁡α0−sin⁡αcos⁡α0001]M;