Click or drag to resize

ImmutableMatrixRotationMatrix Method (Single, Single, Single)

Returns a new instance of a rotation matrix (around x,y)

Namespace:  Atalasoft.FormsProcessing.Geometry
Assembly:  Atalasoft.dotImage.FormsProcessing (in Atalasoft.dotImage.FormsProcessing.dll) Version: 11.0.0.0.0.297 (.NET 4.5.2, x86)
Syntax
public static ImmutableMatrix RotationMatrix(
	float x,
	float y,
	float degrees
)

Parameters

x
Type: SystemSingle
The X coordinate to rotate around.
y
Type: SystemSingle
The Y coordinate to rotate around.
degrees
Type: SystemSingle
The amount of rotation, in degrees.

Return Value

Type: ImmutableMatrix
A new rotation matrix.
Remarks

Remember that the upper left hand corner of your image is 0,0. So, if you want to rotate around the center of your image, X should be half of your image wifth and Y should be half of your image height. For example,

ImmutableMatrix.RotationMatrix( image.Width / 2.0, image.Height / 2.0, degrees );

See Also