DomMatrixReadOnly Class

https://drafts.fxtf.org/geometry/#dommatrixreadonly

public class DomMatrixReadOnly

Constructors

NameDescription
DomMatrixReadOnly()Creates the 2D identity matrix.
DomMatrixReadOnly(IReadOnlyList<double>)Creates a matrix from a sequence of 6 (2D) or 16 (3D) values.
DomMatrixReadOnly(string)Creates a matrix by parsing the given CSS transform list.

DomMatrixReadOnly overloads

DomMatrixReadOnly()

DomMatrix.cs

Creates the 2D identity matrix.

public DomMatrixReadOnly()

DomMatrixReadOnly(IReadOnlyList<double>)

DomMatrix.cs

Creates a matrix from a sequence of 6 (2D) or 16 (3D) values.

public DomMatrixReadOnly(IReadOnlyList<double> init)

DomMatrixReadOnly(string)

DomMatrix.cs

Creates a matrix by parsing the given CSS transform list.

public DomMatrixReadOnly(string init)

Properties

NameDescription
AGets the a component of the matrix, an alias of m11.
BGets the b component of the matrix, an alias of m12.
CGets the c component of the matrix, an alias of m21.
DGets the d component of the matrix, an alias of m22.
EGets the e component of the matrix, an alias of m41.
FGets the f component of the matrix, an alias of m42.
Is2DGets a value indicating whether the matrix is a 2D matrix.
IsIdentityGets a value indicating whether the matrix is the identity matrix.
M11Gets the m11 component of the matrix.
M12Gets the m12 component of the matrix.
M13Gets the m13 component of the matrix.
M14Gets the m14 component of the matrix.
M21Gets the m21 component of the matrix.
M22Gets the m22 component of the matrix.
M23Gets the m23 component of the matrix.
M24Gets the m24 component of the matrix.
M31Gets the m31 component of the matrix.
M32Gets the m32 component of the matrix.
M33Gets the m33 component of the matrix.
M34Gets the m34 component of the matrix.
M41Gets the m41 component of the matrix.
M42Gets the m42 component of the matrix.
M43Gets the m43 component of the matrix.
M44Gets the m44 component of the matrix.

Gets the a component of the matrix, an alias of m11.

public double A { get; }

Gets the b component of the matrix, an alias of m12.

public double B { get; }

Gets the c component of the matrix, an alias of m21.

public double C { get; }

Gets the d component of the matrix, an alias of m22.

public double D { get; }

Gets the e component of the matrix, an alias of m41.

public double E { get; }

Gets the f component of the matrix, an alias of m42.

public double F { get; }

Gets a value indicating whether the matrix is a 2D matrix.

public bool Is2D { get; }

IsIdentity

DomMatrix.cs

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

public bool IsIdentity { get; }

Gets the m11 component of the matrix.

public double M11 { get; }

Gets the m12 component of the matrix.

public double M12 { get; }

Gets the m13 component of the matrix.

public double M13 { get; }

Gets the m14 component of the matrix.

public double M14 { get; }

Gets the m21 component of the matrix.

public double M21 { get; }

Gets the m22 component of the matrix.

public double M22 { get; }

Gets the m23 component of the matrix.

public double M23 { get; }

Gets the m24 component of the matrix.

public double M24 { get; }

Gets the m31 component of the matrix.

public double M31 { get; }

Gets the m32 component of the matrix.

public double M32 { get; }

Gets the m33 component of the matrix.

public double M33 { get; }

Gets the m34 component of the matrix.

public double M34 { get; }

Gets the m41 component of the matrix.

public double M41 { get; }

Gets the m42 component of the matrix.

public double M42 { get; }

Gets the m43 component of the matrix.

public double M43 { get; }

Gets the m44 component of the matrix.

public double M44 { get; }

Methods

NameDescription
FlipX()Returns a new matrix flipped along the X axis.
FlipY()Returns a new matrix flipped along the Y axis.
FromFloat32Array(float[])Creates a read-only matrix from an array of 6 (2D) or 16 (3D) single-precision values.
FromFloat64Array(double[])Creates a read-only matrix from an array of 6 (2D) or 16 (3D) double-precision values.
FromMatrix(DomMatrixInit?)Creates a read-only matrix from the components of the given dictionary.
Inverse()Returns the inverse of the matrix, or a matrix filled with NaN when it is not invertible.
Multiply(DomMatrixInit?)Returns a new matrix that is the product of this matrix and the given matrix.
Rotate(double, double?, double?)Returns a new matrix rotated by the given angles, in degrees, around the X, Y and Z axes.
RotateAxisAngle(double, double, double, double)Returns a new matrix rotated by the given angle, in degrees, around the given axis vector.
RotateFromVector(double, double)Returns a new matrix rotated by the angle between the positive X axis and the given vector.
Scale(double, double?, double, double, double, double)Returns a new matrix scaled by the given factors around the given origin.
Scale3d(double, double, double, double)Returns a new matrix scaled uniformly in 3D around the given origin.
ScaleNonUniform(double, double)Returns a new matrix scaled by the given factors on the X and Y axes.
SkewX(double)Returns a new matrix skewed along the X axis by the given angle in degrees.
SkewY(double)Returns a new matrix skewed along the Y axis by the given angle in degrees.
ToFloat32Array()Returns the 16 components of the matrix as single-precision values, in column-major order.
ToFloat64Array()Returns the 16 components of the matrix as double-precision values, in column-major order.
ToJson()Returns a dictionary representation of the matrix, as used by JSON.stringify().
ToString()https://drafts.fxtf.org/geometry/#dommatrixreadonly-stringification-behavior
TransformPoint(DomPointInit?)Returns the point obtained by transforming the given point with the matrix.
Translate(double, double, double)Returns a new matrix translated by the given offsets.

Returns a new matrix flipped along the X axis.

public DomMatrix FlipX()

Returns a new matrix flipped along the Y axis.

public DomMatrix FlipY()

FromFloat32Array(float[])

DomMatrix.cs

Creates a read-only matrix from an array of 6 (2D) or 16 (3D) single-precision values.

public static DomMatrixReadOnly FromFloat32Array(float[] array32)

FromFloat64Array(double[])

DomMatrix.cs

Creates a read-only matrix from an array of 6 (2D) or 16 (3D) double-precision values.

public static DomMatrixReadOnly FromFloat64Array(double[] array64)

FromMatrix(DomMatrixInit?)

DomMatrix.cs

Creates a read-only matrix from the components of the given dictionary.

public static DomMatrixReadOnly FromMatrix(DomMatrixInit? other = null)

Inverse()

DomMatrix.cs

Returns the inverse of the matrix, or a matrix filled with NaN when it is not invertible.

public DomMatrix Inverse()

Multiply(DomMatrixInit?)

DomMatrix.cs

Returns a new matrix that is the product of this matrix and the given matrix.

public DomMatrix Multiply(DomMatrixInit? other = null)

Rotate(double, double?, double?)

DomMatrix.cs

Returns a new matrix rotated by the given angles, in degrees, around the X, Y and Z axes.

public DomMatrix Rotate(double rotX = 0d, double? rotY = null, double? rotZ = null)

RotateAxisAngle(double, double, double, double)

DomMatrix.cs

Returns a new matrix rotated by the given angle, in degrees, around the given axis vector.

public DomMatrix RotateAxisAngle(double x = 0d, double y = 0d, double z = 0d, double angle = 0d)

RotateFromVector(double, double)

DomMatrix.cs

Returns a new matrix rotated by the angle between the positive X axis and the given vector.

public DomMatrix RotateFromVector(double x = 0d, double y = 0d)

Scale(double, double?, double, double, double, double)

DomMatrix.cs

Returns a new matrix scaled by the given factors around the given origin.

public DomMatrix Scale(double scaleX = 1d, double? scaleY = null, double scaleZ = 1d, double originX = 0d, double originY = 0d, double originZ = 0d)

Scale3d(double, double, double, double)

DomMatrix.cs

Returns a new matrix scaled uniformly in 3D around the given origin.

public DomMatrix Scale3d(double scale = 1d, double originX = 0d, double originY = 0d, double originZ = 0d)

ScaleNonUniform(double, double)

DomMatrix.cs

Returns a new matrix scaled by the given factors on the X and Y axes.

public DomMatrix ScaleNonUniform(double scaleX = 1d, double scaleY = 1d)

SkewX(double)

DomMatrix.cs

Returns a new matrix skewed along the X axis by the given angle in degrees.

public DomMatrix SkewX(double sx = 0d)

SkewY(double)

DomMatrix.cs

Returns a new matrix skewed along the Y axis by the given angle in degrees.

public DomMatrix SkewY(double sy = 0d)

ToFloat32Array()

DomMatrix.cs

Returns the 16 components of the matrix as single-precision values, in column-major order.

public float[] ToFloat32Array()

ToFloat64Array()

DomMatrix.cs

Returns the 16 components of the matrix as double-precision values, in column-major order.

public double[] ToFloat64Array()

ToJson()

DomMatrix.cs

Returns a dictionary representation of the matrix, as used by JSON.stringify().

public DomMatrixInit ToJson()

ToString()

DomMatrix.cs

https://drafts.fxtf.org/geometry/#dommatrixreadonly-stringification-behavior

public override string ToString()

Returns

string

TransformPoint(DomPointInit?)

DomMatrix.cs

Returns the point obtained by transforming the given point with the matrix.

public DomPoint TransformPoint(DomPointInit? point = null)

Translate(double, double, double)

DomMatrix.cs

Returns a new matrix translated by the given offsets.

public DomMatrix Translate(double tx = 0d, double ty = 0d, double tz = 0d)