DOMMatrixReadOnly : Object
Constructors
Constructs a new matrix using the specified cssTransform
. The syntax for this string is the same as for the css transform property.
Example:
RunResults:
values
must have either 6
or 16
elements in it.
If 6
elements are specified (a
, b
, ..., f
), the matrix will be a 2D matrix constructed like:
a | c | e |
b | d | f |
0 | 0 | 1 |
Example:
RunResults:
If 16
elements are specified (m11
, m12
, m13
, m14
, m21
, m22
, ..., m44
), the matrix will be a 3D matrix constructed like:
m11 | m12 | m13 | m14 |
m21 | m22 | m23 | m24 |
m31 | m32 | m33 | m34 |
m41 | m42 | m43 | m44 |
Example:
RunResults:
Instance Properties
true
if this
is an identity matrix (diagonal elements are 1
, rest are 0
).
Example:
RunResults:
Instance Methods
See also DOMMatrix.rotateAxisAngleSelf().
Rotates this
by the angle between the x axis and the vector from the origin to the specified point (x
, y
). Same as this.rotate
(Math.atan2(y, x) * 180 / Math.PI). See also DOMMatrix.rotateFromVectorSelf().
Example:
RunResults:
See also DOMMatrix.scaleSelf().
See also DOMMatrix.scale3DSelf().