The `DOMMatrix`

interface represents 4x4 matrices, suitable for 2D and 3D operations.

Documentation DOMMatrix by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See also:

### Constructor

`new(numberSequence:Array<Float>)`

`new()`

`new(transformList:String)`

`new(other:DOMMatrixReadOnly)`

`new(array32:Float32Array)`

`new(array64:Float64Array)`

Throws:

`null` | DOMError |
---|

### Methods

`rotateAxisAngleSelf(x:Float, y:Float, z:Float, angle:Float):DOMMatrix`

Returns itself, a `DOMMatrix`

, with its new content being the result of the original matrix being rotated by the given angle and the give vector.

`rotateFromVectorSelf(x:Float, y:Float):DOMMatrix`

Returns itself, a `DOMMatrix`

, with its new content being the result of the original matrix being rotated by the angle between the given vector and (1,0), centered on the origin given.

`rotateSelf(angle:Float, originX:Float = 0.0, originY:Float = 0.0):DOMMatrix`

Returns itself, a `DOMMatrix`

, with its new content being the result of the original matrix being rotated by the given angle, with the rotation centered on the origin given.

`scale3dSelf(scale:Float, originX:Float = 0.0, originY:Float = 0.0, originZ:Float = 0.0):DOMMatrix`

Returns itself, a `DOMMatrix`

, with its new content being the result of the matrix x, y and z dimension being scaled by the given factor, centered on the origin given.

`scaleNonUniformSelf(scaleX:Float, scaleY:Float = 1.0, scaleZ:Float = 1.0, originX:Float = 0.0, originY:Float = 0.0, originZ:Float = 0.0):DOMMatrix`

Returns itself, a `DOMMatrix`

, with its new content being the result of the matrix x, y and z dimension being scaled by the given factor for each dimension, centered on the origin given.

`scaleSelf(scale:Float, originX:Float = 0.0, originY:Float = 0.0):DOMMatrix`

Returns itself, a `DOMMatrix`

, with its new content being the result of the matrix x and y dimensions being scaled by the given factor, centered on the origin given.

`setMatrixValue(transformList:String):DOMMatrix`

Returns itself, a `DOMMatrix`

, with its describing the matrix representing the same transformation as the CSS `transform`

functions given in parameter.

Throws:

`null` | DOMError |
---|

`skewXSelf(sx:Float):DOMMatrix`

Returns itself, a `DOMMatrix`

, with its new content being the result of the original matrix being skewed along the x-axis by the given factor.