Table of Contents

Class TransformMatrix

Namespace
Alternet.Drawing
Assembly
Alternet.UI.Common.dll

Encapsulates a 3-by-2 affine matrix that represents a geometric transform. This class cannot be inherited.

public class TransformMatrix : BaseObject, IBaseObject
Inheritance
TransformMatrix
Implements

Constructors

TransformMatrix()

Initializes a new instance of the TransformMatrix class as the identity matrix.

TransformMatrix(double, double, double, double, double, double)

Initializes a new instance of the TransformMatrix class with the specified elements.

Fields

Default

Gets identity matrix.

Properties

DX

Get or sets the translation in the x-direction (the dx value, or the element in the third row and first column) of the matrix. This is the same as TransX.

DY

Get or sets the translation in the y-direction (the dy value, or the element in the third row and second column) of the matrix. This is the same as TransY.

Determinant

Gets the determinant of this matrix.

Elements

Gets an array of floating-point values that represents the elements of this TransformMatrix.

IsIdentity

Gets a value indicating whether this TransformMatrix is the identity matrix.

M11

Gets or sets the scaling in the x-direction. This is the same as ScaleX. This is the value in the first row and first column of the matrix.

M12

Gets or sets the skew in the y-direction. This is the value in the first row and second column of the matrix. This is the same as SkewY.

M21

Gets or sets the skew in the x-direction. This is the value in the second row and first column of the matrix. This is the same as SkewX.

M22

Gets or sets the scaling in the y-direction. This is the value in the second row and second column of the matrix. This is the same as ScaleY.

ScaleX

Gets or sets the scaling in the x-direction. This is the same as M11. This is the value in the first row and first column of the matrix.

ScaleY

Gets or sets the scaling in the y-direction. This is the same as M22. This is the value in the second row and second column in the matrix.

SkewX

Gets or sets the skew in the x-direction. This is the same as M21. This is the value in the second row and first column in the matrix.

SkewY

Gets or sets the skew in the y-direction. This is the value in the first row and second column in the matrix. This is the same as M12.

TransX

Get or sets the translation in the x-direction. This is the same as DX. This is the value in the third row and first column in the matrix.

TransY

Get or sets the translation in the y-direction. This is the same as DY. This is the value in the third row and second column in the matrix.

Methods

CreateRotation(double)

Creates a TransformMatrix with clockwise rotation of the specified angle about the origin.

CreateScale(double, double)

Creates a TransformMatrix with the specified scale vector.

CreateTranslation(double, double)

Creates a TransformMatrix with the specified translation vector.

Equals(object?)
GetHashCode()
Invert()

Inverts this matrix, if it is invertible.

Multiply(TransformMatrix)

Multiplies this TransformMatrix by the specified TransformMatrix by prepending the specified TransformMatrix.

Reset()

Resets this TransformMatrix to have the elements of the identity matrix.

Rotate(double)

Applies a clockwise rotation of the specified angle (degrees) about the origin to this TransformMatrix.

RotateRadians(double)

Applies a clockwise rotation of the specified angle (radians) about the origin to this TransformMatrix.

Scale(double, double)

Applies the specified scale vector to this TransformMatrix by prepending the scale vector.

TransformPoint(PointD)

Applies the geometric transform this TransformMatrix represents to a point.

TransformSize(SizeD)

Applies the geometric transform this TransformMatrix represents to a size.

Translate(double, double)

Applies the specified translation vector to this TransformMatrix by prepending the translation vector.

Operators

explicit operator SKMatrix(TransformMatrix)

Converts TransformMatrix to SKMatrix.

explicit operator TransformMatrix(SKMatrix)

Converts SKMatrix to TransformMatrix.