Class DOMMatrix
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The DOMMatrix interface represents 4×4 matrices, suitable for 2D and 3D operations including rotation and translation. It is a mutable version of the DOMMatrixReadOnly interface.
The interface is available inside web workers.
[Value("DOMMatrix")]
public class DOMMatrix : DOMMatrixReadOnly
- Inheritance
-
DOMMatrix
- Inherited Members
Remarks
Constructors
DOMMatrix()
public DOMMatrix()
DOMMatrix(Union50)
The DOMMatrix constructor creates a new
DOMMatrix object which represents 4x4 matrices, suitable for 2D and 3D
operations.
public DOMMatrix(Union50 init = default)
Parameters
initUnion50
Remarks
Properties
A
[Value("a")]
public double A { get; set; }
Property Value
B
[Value("b")]
public double B { get; set; }
Property Value
C
[Value("c")]
public double C { get; set; }
Property Value
D
[Value("d")]
public double D { get; set; }
Property Value
E
[Value("e")]
public double E { get; set; }
Property Value
F
[Value("f")]
public double F { get; set; }
Property Value
M11
[Value("m11")]
public double M11 { get; set; }
Property Value
M12
[Value("m12")]
public double M12 { get; set; }
Property Value
M13
[Value("m13")]
public double M13 { get; set; }
Property Value
M14
[Value("m14")]
public double M14 { get; set; }
Property Value
M21
[Value("m21")]
public double M21 { get; set; }
Property Value
M22
[Value("m22")]
public double M22 { get; set; }
Property Value
M23
[Value("m23")]
public double M23 { get; set; }
Property Value
M24
[Value("m24")]
public double M24 { get; set; }
Property Value
M31
[Value("m31")]
public double M31 { get; set; }
Property Value
M32
[Value("m32")]
public double M32 { get; set; }
Property Value
M33
[Value("m33")]
public double M33 { get; set; }
Property Value
M34
[Value("m34")]
public double M34 { get; set; }
Property Value
M41
[Value("m41")]
public double M41 { get; set; }
Property Value
M42
[Value("m42")]
public double M42 { get; set; }
Property Value
M43
[Value("m43")]
public double M43 { get; set; }
Property Value
M44
[Value("m44")]
public double M44 { get; set; }
Property Value
Methods
FromFloat32Array(Float32Array)
[Value("fromFloat32Array")]
public static DOMMatrix FromFloat32Array(Float32Array array32)
Parameters
array32Float32Array
Returns
FromFloat64Array(Float64Array)
[Value("fromFloat64Array")]
public static DOMMatrix FromFloat64Array(Float64Array array64)
Parameters
array64Float64Array
Returns
FromMatrix(DOMMatrixInit)
[Value("fromMatrix")]
public static DOMMatrix FromMatrix(DOMMatrixInit other = null)
Parameters
otherDOMMatrixInit
Returns
InvertSelf()
The invertSelf() method of the DOMMatrix interface inverts the original matrix. If the matrix cannot be inverted, the new matrix's components are all set to NaN and its DOMMatrixReadonly.Is2D property is set to false.
[Value("invertSelf")]
public DOMMatrix InvertSelf()
Returns
Remarks
To invert a matrix without mutating it, see Inverse()
-Inverse()
-CSS transform-function/matrix function
-CSS transform-function/matrix3d function
MultiplySelf(DOMMatrixInit)
The multiplySelf() method of the DOMMatrix interface multiplies a matrix by the otherMatrix parameter, computing the dot product of the original matrix and the specified matrix: A⋅B. If no matrix is specified as the multiplier, the matrix is multiplied by a matrix in which every element is 0 except the bottom-right corner and the element immediately above and to its left: m33 and m34. These have the default value of 1.
[Value("multiplySelf")]
public DOMMatrix MultiplySelf(DOMMatrixInit other = null)
Parameters
otherDOMMatrixInit
Returns
Remarks
To multiply a matrix without mutating it, see Multiply(DOMMatrixInit).
-Multiply(DOMMatrixInit)
-PreMultiplySelf(DOMMatrixInit)
-CSS transform-function/matrix function
-CSS transform-function/matrix3d function
PreMultiplySelf(DOMMatrixInit)
The preMultiplySelf() method of the DOMMatrix interface modifies the matrix by pre-multiplying it with the specified DOMMatrix. This is equivalent to the dot product B⋅A, where matrix A is the source matrix and B is the matrix given as an input to the method. If no matrix is specified as the multiplier, the matrix is multiplied by a matrix in which every element is 0 except the bottom-right corner and the element immediately above and to its left: m33 and m34. These have the default value of 1.
[Value("preMultiplySelf")]
public DOMMatrix PreMultiplySelf(DOMMatrixInit other = null)
Parameters
otherDOMMatrixInit
Returns
Remarks
-MultiplySelf(DOMMatrixInit)
-Multiply(DOMMatrixInit)
-CSS transform-function/matrix function
-CSS transform-function/matrix3d function
RotateAxisAngleSelf(double, double, double, double)
The rotateAxisAngleSelf() method of the DOMMatrix interface is a transformation method that rotates the source matrix by the given vector and angle, returning the altered matrix.
[Value("rotateAxisAngleSelf")]
public DOMMatrix RotateAxisAngleSelf(double x = 0, double y = 0, double z = 0, double angle = 0)
Parameters
Returns
Remarks
To rotate a matrix without mutating it, see RotateAxisAngle(double, double, double, double), which creates a new rotated matrix while leaving the original unchanged.
-RotateAxisAngle(double, double, double, double)
-RotateSelf(double, double, double)
-RotateFromVectorSelf(double, double)
-CSS transform property and transform-function/rotate3d function
-CSS rotate property
-CSS transforms module
-SVG transform attribute
-CanvasRenderingContext2D interface and CanvasRenderingContext2D.Rotate method
RotateFromVectorSelf(double, double)
The rotateFromVectorSelf() method of the DOMMatrix interface is a mutable transformation method that modifies a matrix by rotating the matrix by the angle between the specified vector and (1, 0). The rotation angle is determined by the angle between the vector (1,0)T and (x,y)T in the clockwise direction, or (+/-)arctan(y/x). If x and y are both 0, the angle is specified as 0, and the matrix is not altered.
[Value("rotateFromVectorSelf")]
public DOMMatrix RotateFromVectorSelf(double x = 0, double y = 0)
Parameters
Returns
Remarks
To rotate a matrix from a vector without mutating it, see RotateFromVector(double, double), which creates a new rotated matrix while leaving the original unchanged.
-RotateFromVector(double, double)
-RotateSelf(double, double, double)
-RotateAxisAngleSelf(double, double, double, double)
-CSS transform property and transform-function/rotate3d function
-CSS rotate property
-CSS transforms module
-SVG transform attribute
-CanvasRenderingContext2D interface and CanvasRenderingContext2D.Rotate method
RotateSelf(double, double, double)
The rotateSelf() method of the DOMMatrix interface is a mutable transformation method that modifies a matrix. It rotates the source matrix around each of its axes by the specified number of degrees and returns the rotated matrix.
[Value("rotateSelf")]
public DOMMatrix RotateSelf(double rotX = 0, double rotY = 0, double rotZ = 0)
Parameters
Returns
Remarks
To rotate a matrix without mutating it, see Rotate(double, double, double)
-Rotate(double, double, double)
-CSS transform property
-CSS rotate property
-CSS transform-function functions-transform-function/rotate
-transform-function/rotate3d
-transform-function/rotateX
-transform-function/rotateY
-transform-function/rotateZ
-CSS transforms module
-SVG transform attribute
-CanvasRenderingContext2D interface methods-CanvasRenderingContext2D.Rotate
-CanvasRenderingContext2D.Transform
-CanvasRenderingContext2D.SetTransform
-CanvasRenderingContext2D.ResetTransform
Scale3dSelf(double, double, double, double)
The scale3dSelf() method of the DOMMatrix interface is a mutable transformation method that modifies a matrix by applying a specified scaling factor to all three axes, centered on the given origin, with a default origin of (0, 0, 0), returning the 3D-scaled matrix.
[Value("scale3dSelf")]
public DOMMatrix Scale3dSelf(double scale = 0, double originX = 0, double originY = 0, double originZ = 0)
Parameters
Returns
Remarks
To 3D-scale a matrix without mutating it, see Scale3d(double, double, double, double), which creates a new scaled matrix while leaving the original unchanged.
-Scale3d(double, double, double, double)
-ScaleSelf(double, double, double, double, double, double)
-CSS transform property and the transform-function/scale and transform-function/matrix3d functions
-CSS transforms module
-SVG transform attribute
-CanvasRenderingContext2D interface CanvasRenderingContext2D.Transform method
ScaleSelf(double, double, double, double, double, double)
The scaleSelf() method of the DOMMatrix interface is a mutable transformation method that modifies a matrix by applying a specified scaling factor, centered on the given origin, with a default origin of (0, 0), returning the scaled matrix.
[Value("scaleSelf")]
public DOMMatrix ScaleSelf(double scaleX = 0, double scaleY = 0, double scaleZ = 0, double originX = 0, double originY = 0, double originZ = 0)
Parameters
Returns
- DOMMatrix
Returns itself; a DOMMatrix.If a scale is applied about the z-axis, the matrix will be a 4✕4 3D matrix.
Remarks
To scale a matrix without mutating it, see Scale(double, double, double, double, double, double), which creates a new scaled matrix while leaving the original unchanged.
-Scale(double, double, double, double, double, double)
-Scale3dSelf(double, double, double, double)
-CSS transform property and the transform-function/scale and transform-function/matrix functions
-CSS transforms module
-SVG transform attribute
-CanvasRenderingContext2D interface CanvasRenderingContext2D.Transform method
SetMatrixValue(string)
The setMatrixValue() method of the DOMMatrix interface replaces the contents of the matrix with the matrix described by the specified transform or transforms, returning itself.
[Value("setMatrixValue")]
public DOMMatrix SetMatrixValue(string transformList)
Parameters
transformListstring
Returns
Remarks
-TranslateSelf(double, double, double)
-Is2D
-CSS transform-function/matrix function
-CSS transform-function/matrix3d function
SkewXSelf(double)
The skewXSelf() method of the DOMMatrix interface is a mutable transformation method that modifies a matrix. It skews the source matrix by applying the specified skew transformation along the X-axis and returns the skewed matrix.
[Value("skewXSelf")]
public DOMMatrix SkewXSelf(double sx = 0)
Parameters
sxdouble
Returns
Remarks
To skew a matrix along the X-axis without mutating it, see SkewX(double)
-SkewX(double)
-CSS transform property
-CSS transform-function functions-transform-function/skew
-transform-function/skewX
-transform-function/skewY
-CSS transforms module
-SVG transform attribute
-CanvasRenderingContext2D interface methods-CanvasRenderingContext2D.Transform
-CanvasRenderingContext2D.SetTransform
-CanvasRenderingContext2D.ResetTransform
SkewYSelf(double)
The skewYSelf() method of the DOMMatrix interface is a mutable transformation method that modifies a matrix. It skews the source matrix by applying the specified skew transformation along the Y-axis and returns the skewed matrix.
[Value("skewYSelf")]
public DOMMatrix SkewYSelf(double sy = 0)
Parameters
sydouble
Returns
Remarks
To skew a matrix along the Y-axis without mutating it, see SkewY(double)
-SkewY(double)
-CSS transform property
-CSS transform-function functions-transform-function/skew
-transform-function/skewX
-transform-function/skewY
-CSS transforms module
-SVG transform attribute
-CanvasRenderingContext2D interface methods-CanvasRenderingContext2D.Transform
-CanvasRenderingContext2D.SetTransform
-CanvasRenderingContext2D.ResetTransform
TranslateSelf(double, double, double)
The translateSelf() method of the DOMMatrix interface is a mutable transformation method that modifies a matrix. It applies the specified vectors and returns the updated matrix. The default vector is [0, 0, 0].
[Value("translateSelf")]
public DOMMatrix TranslateSelf(double tx = 0, double ty = 0, double tz = 0)
Parameters
Returns
Remarks
To translate a matrix without mutating it, see Translate(double, double, double)
-Translate(double, double, double)
-CSS transform property
-CSS translate property
-CSS transform-function functions-transform-function/translate
-transform-function/translate3d
-transform-function/translateX
-transform-function/translateY
-transform-function/translateZ
-CSS transforms module
-SVG transform attribute
-CanvasRenderingContext2D interface methods-CanvasRenderingContext2D.Translate
-CanvasRenderingContext2D.Transform
-CanvasRenderingContext2D.SetTransform
-CanvasRenderingContext2D.ResetTransform