package js.html
extended by DOMMatrix
Available on jsThe
DOMMatrixReadOnly
interface represents 4x4 matrices, suitable for 2D and 3D operations. If this interface defines only read-only matrices, theDOMMatrix
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:
read only a:Float
Are double
representing each component of a 4x4 matrix needed for 2D rotations and translations. They are aliases for some components of the 4x4 matrix:
a | m11 |
b | m12 |
c | m21 |
d | m22 |
e | m41 |
f | m42 |
DOMMatrix
aren't.
read only b:Float
read only c:Float
read only d:Float
read only e:Float
read only f:Float
read only identity:Bool
read only is2D:Bool
Is a Boolean
indicating if the matrix contains a 2D matrix and only accept 2D transformations.
read only m11:Float
Are double
representing each component of a 4x4 matrix. They are read-only, but their counterpart, with the same name, in DOMMatrix
aren't.
read only m12:Float
read only m13:Float
read only m14:Float
read only m21:Float
read only m22:Float
read only m23:Float
read only m24:Float
read only m31:Float
read only m32:Float
read only m33:Float
read only m34:Float
read only m41:Float
read only m42:Float
read only m43:Float
read only m44:Float
flipX ():DOMMatrix
Returns 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 ():DOMMatrix
Returns 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 ():DOMMatrix
multiply (other:DOMMatrix):DOMMatrix
Returns 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):DOMMatrix
Returns 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):DOMMatrix
Returns a DOMMatrix
containing a new matrix being the result of the original matrix being rotated by the given angle and the give vector. The original matrix is not modified.
rotateFromVector (x:Float, y:Float):DOMMatrix
Returns 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):DOMMatrix
Returns 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):DOMMatrix
Returns 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):DOMMatrix
Returns 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):DOMMatrix
Returns 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):DOMMatrix
Returns 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 ():Float32Array
Throws:
null |
DOMError |
---|
toFloat64Array ():Float64Array
Throws:
null |
DOMError |
---|
transformPoint (?point:DOMPointInit):DOMPoint
Returns a DOMPoint
that is the point given in parameter multiplied by the matrix. Bot the original point and the matrix aren't modified.
translate (tx:Float, ty:Float, tz:Float = 0.0):DOMMatrix
Returns 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–2016 Haxe Foundation
Licensed under a MIT license.
http://api.haxe.org/js/html/DOMMatrixReadOnly.html