DomMatrixReadOnly Class
https://drafts.fxtf.org/geometry/#dommatrixreadonly
public class DomMatrixReadOnlyConstructors
| Name | Description |
|---|---|
| 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.csCreates the 2D identity matrix.
public DomMatrixReadOnly()DomMatrixReadOnly(IReadOnlyList<double>)
DomMatrix.csCreates a matrix from a sequence of 6 (2D) or 16 (3D) values.
public DomMatrixReadOnly(IReadOnlyList<double> init)DomMatrixReadOnly(string)
DomMatrix.csProperties
| Name | Description |
|---|---|
| A | Gets the a component of the matrix, an alias of m11. |
| B | Gets the b component of the matrix, an alias of m12. |
| C | Gets the c component of the matrix, an alias of m21. |
| D | Gets the d component of the matrix, an alias of m22. |
| E | Gets the e component of the matrix, an alias of m41. |
| F | Gets the f component of the matrix, an alias of m42. |
| Is2D | Gets a value indicating whether the matrix is a 2D matrix. |
| IsIdentity | Gets a value indicating whether the matrix is the identity matrix. |
| M11 | Gets the m11 component of the matrix. |
| M12 | Gets the m12 component of the matrix. |
| M13 | Gets the m13 component of the matrix. |
| M14 | Gets the m14 component of the matrix. |
| M21 | Gets the m21 component of the matrix. |
| M22 | Gets the m22 component of the matrix. |
| M23 | Gets the m23 component of the matrix. |
| M24 | Gets the m24 component of the matrix. |
| M31 | Gets the m31 component of the matrix. |
| M32 | Gets the m32 component of the matrix. |
| M33 | Gets the m33 component of the matrix. |
| M34 | Gets the m34 component of the matrix. |
| M41 | Gets the m41 component of the matrix. |
| M42 | Gets the m42 component of the matrix. |
| M43 | Gets the m43 component of the matrix. |
| M44 | Gets 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; }Is2D
DomMatrix.csGets a value indicating whether the matrix is a 2D matrix.
public bool Is2D { get; }IsIdentity
DomMatrix.csGets a value indicating whether the matrix is the identity matrix.
public bool IsIdentity { get; }M11
DomMatrix.csGets the m11 component of the matrix.
public double M11 { get; }M12
DomMatrix.csGets the m12 component of the matrix.
public double M12 { get; }M13
DomMatrix.csGets the m13 component of the matrix.
public double M13 { get; }M14
DomMatrix.csGets the m14 component of the matrix.
public double M14 { get; }M21
DomMatrix.csGets the m21 component of the matrix.
public double M21 { get; }M22
DomMatrix.csGets the m22 component of the matrix.
public double M22 { get; }M23
DomMatrix.csGets the m23 component of the matrix.
public double M23 { get; }M24
DomMatrix.csGets the m24 component of the matrix.
public double M24 { get; }M31
DomMatrix.csGets the m31 component of the matrix.
public double M31 { get; }M32
DomMatrix.csGets the m32 component of the matrix.
public double M32 { get; }M33
DomMatrix.csGets the m33 component of the matrix.
public double M33 { get; }M34
DomMatrix.csGets the m34 component of the matrix.
public double M34 { get; }M41
DomMatrix.csGets the m41 component of the matrix.
public double M41 { get; }M42
DomMatrix.csGets the m42 component of the matrix.
public double M42 { get; }M43
DomMatrix.csGets the m43 component of the matrix.
public double M43 { get; }M44
DomMatrix.csGets the m44 component of the matrix.
public double M44 { get; }Methods
| Name | Description |
|---|---|
| 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. |
FlipX()
DomMatrix.csReturns a new matrix flipped along the X axis.
public DomMatrix FlipX()FlipY()
DomMatrix.csReturns a new matrix flipped along the Y axis.
public DomMatrix FlipY()FromFloat32Array(float[])
DomMatrix.csCreates a read-only matrix from an array of 6 (2D) or 16 (3D) single-precision values.
public static DomMatrixReadOnly FromFloat32Array(float[] array32)Parameters
array32float[]
Returns
See also
FromFloat64Array(double[])
DomMatrix.csCreates a read-only matrix from an array of 6 (2D) or 16 (3D) double-precision values.
public static DomMatrixReadOnly FromFloat64Array(double[] array64)Parameters
array64double[]
Returns
See also
FromMatrix(DomMatrixInit?)
DomMatrix.csCreates a read-only matrix from the components of the given dictionary.
public static DomMatrixReadOnly FromMatrix(DomMatrixInit? other = null)Inverse()
DomMatrix.csReturns the inverse of the matrix, or a matrix filled with NaN when it is not invertible.
public DomMatrix Inverse()Multiply(DomMatrixInit?)
DomMatrix.csReturns 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.csReturns a new matrix rotated by the given angles, in degrees, around the X, Y and Z axes.
Parameters
Returns
See also
RotateAxisAngle(double, double, double, double)
DomMatrix.csReturns a new matrix rotated by the given angle, in degrees, around the given axis vector.
RotateFromVector(double, double)
DomMatrix.csScale(double, double?, double, double, double, double)
DomMatrix.csScale3d(double, double, double, double)
DomMatrix.csScaleNonUniform(double, double)
DomMatrix.csSkewX(double)
DomMatrix.csReturns a new matrix skewed along the X axis by the given angle in degrees.
SkewY(double)
DomMatrix.csReturns a new matrix skewed along the Y axis by the given angle in degrees.
ToFloat32Array()
DomMatrix.csReturns the 16 components of the matrix as single-precision values, in column-major order.
public float[] ToFloat32Array()ToFloat64Array()
DomMatrix.csReturns the 16 components of the matrix as double-precision values, in column-major order.
public double[] ToFloat64Array()ToJson()
DomMatrix.csReturns a dictionary representation of the matrix, as used by JSON.stringify().
public DomMatrixInit ToJson()ToString()
DomMatrix.csTransformPoint(DomPointInit?)
DomMatrix.csReturns the point obtained by transforming the given point with the matrix.
public DomPoint TransformPoint(DomPointInit? point = null)