package js.html
extended by DOMMatrix
Available on js
The DOMMatrixReadOnly interface represents 4x4 matrices, suitable for 2D and 3D operations. If this interface defines only read-only matrices, the DOMMatrix interface which inherits from it, add all the properties and the methods to allow to have modifiable matrices.
Documentation DOMMatrixReadOnly by Mozilla Contributors, licensed under CC-BY-SA 2.5.
See also:
new(?init:String)new(?init:Array<Float>)Throws:
null |
DOMError |
|---|
read onlya:FloatAre double representing each component of a 4x4 matrix needed for 2D rotations and translations. They are aliases for some components of the 4x4 matrix:
DOMMatrix aren't.read onlyb:Floatread onlyc:Floatread onlyd:Floatread onlye:Floatread onlyf:Floatread onlyis2D:BoolIs a Boolean indicating if the matrix contains a 2D matrix and only accept 2D transformations.
read onlyisIdentity:BoolIs a Boolean indincating if the matrix identity, that is a matrix with 1 on the components of its diagonal, and 0 elsewhere.
read onlym11:FloatAre double representing each component of a 4x4 matrix. They are read-only, but their counterpart, with the same name, in DOMMatrix aren't.
read onlym12:Floatread onlym13:Floatread onlym14:Floatread onlym21:Floatread onlym22:Floatread onlym23:Floatread onlym24:Floatread onlym31:Floatread onlym32:Floatread onlym33:Floatread onlym34:Floatread onlym41:Floatread onlym42:Floatread onlym43:Floatread onlym44:FloatflipX():DOMMatrixReturns a DOMMatrix containing a new matrix being the result of the original matrix being flipped around the x-axis, that is multiplied by the DOMMatrix(-1, 0, 0, 1, 0, 0). The original matrix is not modified.
flipY():DOMMatrixReturns a DOMMatrix containing a new matrix being the result of the original matrix being flipped around the y-axis, that is multiplied by the DOMMatrix(1, 0, 0, -1, 0, 0). The original matrix is not modified.
inverse():DOMMatrixReturns a DOMMatrix containing a new matrix being the result of the original matrix being inverted. The original matrix is not modified. If the matrix cannot be inverted, all its components are set to NaN and is2D() returns false.
multiply(other:DOMMatrix):DOMMatrixReturns a DOMMatrix containing a new matrix being the result of the original matrix being multiplied by the given DOMMatrix. The original matrix is not modified.
rotate(angle:Float, originX:Float = 0.0, originY:Float = 0.0):DOMMatrixReturns a DOMMatrix containing a new matrix being the result of the original matrix being rotated by the given angle, with the rotation centered on the origin given. The original matrix is not modified.
rotateAxisAngle(x:Float, y:Float, z:Float, angle:Float):DOMMatrixReturns a DOMMatrix containing a new matrix being the result of the original matrix being rotated by the given angle and the given vector. The original matrix is not modified.
rotateFromVector(x:Float, y:Float):DOMMatrixReturns a DOMMatrix containing a new matrix being the result of the original matrix being rotated by the angle between the given vector and (1,0), centered on the origin given. The original matrix is not modified.
scale(scale:Float, originX:Float = 0.0, originY:Float = 0.0):DOMMatrixReturns a DOMMatrix containing a new matrix being the result of the matrix x and y dimensions being scaled by the given factor, centered on the origin given. The original matrix is not modified.
scale3d(scale:Float, originX:Float = 0.0, originY:Float = 0.0, originZ:Float = 0.0):DOMMatrixReturns a DOMMatrix containing a new matrix being the result of the matrix x, y and z dimension being scaled by the given factor, centered on the origin given. The original matrix is not modified.
scaleNonUniform(scaleX:Float, scaleY:Float = 1.0, scaleZ:Float = 1.0, originX:Float = 0.0, originY:Float = 0.0, originZ:Float = 0.0):DOMMatrixReturns a DOMMatrix containing a new matrix 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. The original matrix is not modified.
skewX(sx:Float):DOMMatrixReturns a DOMMatrix containing a new matrix being the result of the original matrix being skewed along the x-axis by the given factor. The original matrix is not modified.
skewY(sy:Float):DOMMatrixReturns a DOMMatrix containing a new matrix being the result of the original matrix being skewed along the y-axis by the given factor. The original matrix is not modified.
toFloat32Array():Float32ArrayReturns a Float32Array containing the 6 components (a, b, c, d, e, f) in the case of a 2D matrix or the 16 components (m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44) for a 3D matrix.
Throws:
null |
DOMError |
|---|
toFloat64Array():Float64ArrayReturns a Float64Array containing the 6 components (a, b, c, d, e, f) in the case of a 2D matrix or the 16 components (m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44) for a 3D matrix.
Throws:
null |
DOMError |
|---|
toJSON():DynamicReturns a JSON representation of the DOMMatrixReadOnly object.
transformPoint(?point:Null<DOMPointInit>):DOMPointReturns a DOMPoint that is the point given in parameter multiplied by the matrix. But the original point and the matrix aren't modified.
translate(tx:Float, ty:Float, tz:Float = 0.0):DOMMatrixReturns a DOMMatrix containing a new matrix being the result of the matrix being translated by the given vector. The original matrix is not modified.
© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/DOMMatrixReadOnly.html