Table of Contents

Struct TransformMatrix

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

Encapsulates a 3-by-2 affine matrix that represents a geometric transform.

public struct TransformMatrix : IEquatable<TransformMatrix>
Implements

Constructors

TransformMatrix()

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

TransformMatrix(TransformMatrix)

Initializes a new instance of the TransformMatrix class using data from the specified matrix.

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

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

Fields

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.

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.

Properties

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.

Methods

Assign(TransformMatrix)

Assigns matrix values with data from the specified matrix;

Clone()

Creates a copy of this matrix.

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(TransformMatrix)

Gets whether this matrix equals another matrix.

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.

TransformRect(RectD)

Applies the geometric transform this TransformMatrix represents to a rectangle.

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

operator ==(TransformMatrix, TransformMatrix)

Tests whether two specified TransformMatrix structures are equivalent.

explicit operator SKMatrix(TransformMatrix)

Converts TransformMatrix to SKMatrix.

explicit operator TransformMatrix(SKMatrix)

Converts SKMatrix to TransformMatrix.

operator !=(TransformMatrix, TransformMatrix)

Tests whether TransformMatrix and TransformMatrix structures are different.