DOMMatrixReadOnly

Οι εθελοντές μας δεν έχουν μεταφράσει αυτό το άρθρο στα Ελληνικά, ακόμα. Γίνετε μέλος και βοηθήστε στη μετάφραση!
Μπορείτε επίσης να διαβάσετε το άρθρο στα English (US).

The DOMMatrixReadOnly interface represents a 4x4 matrix, 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.

A 4x4 matrix is suitable to describe any rotation and translation in 3D.

This interface should be available inside Web workers, though some implementations doesn't allow it yet.

Properties

This interface doesn't inherit any other property.

m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44 Read only
Are double representing each component of a 4x4 matrix. They are read-only, but their counterpart, with the same name, in DOMMatrix aren't.
a, b, c, d, e, f Read only
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:
2D 3D equivalent
a m11
b m12
c m21
d m22
e m41
f m42
They are read-only, but their counterpart, with the same name, in DOMMatrix aren't.
DOMMatrixReadOnly.is2D Read only
Is a Boolean indicating if the matrix contains a 2D matrix and only accept 2D transformations.
DOMMatrixReadOnly.isIdentity Read only
Is a Boolean indincating if the matrix identity, that is a matrix with 1 on the components of its diagonal, and 0 elsewhere.

Methods

This interface doesn't inherit any method.

DOMMatrixReadOnly.flipX()
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.
DOMMatrixReadOnly.flipY()
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.
DOMMatrixReadOnly.inverse()
Returns 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.
DOMMatrixReadOnly.multiply()
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.
DOMMatrixReadOnly.rotateAxisAngle()
Returns 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.
DOMMatrixReadOnly.rotate()
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.
DOMMatrixReadOnly.rotateFromVector()
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.
DOMMatrixReadOnly.scale()
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.
DOMMatrixReadOnly.scale3d()
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.
DOMMatrixReadOnly.scaleNonUniform()
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.
DOMMatrixReadOnly.skewX()
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.
DOMMatrixReadOnly.skewY()
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.
DOMMatrixReadOnly.toFloat32Array()
Returns 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.
DOMMatrixReadOnly.toFloat64Array()
Returns 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.
DOMMatrixReadOnly.toJSON()
Returns a JSON representation of the DOMMatrixReadOnly object.
DOMMatrixReadOnly.toString()
Returns a DOMString containing the 6 components separated by a ',' and prefixed by the CSS matrix functional notation, as 'matrix (a, b, c, d, e, f)', in the case of a 2D matrix or matrix3d functional notation and the 16 components,'matrix3d(m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44)', for a 3D matrix.
DOMMatrixReadOnly.transformPoint()
Returns a DOMPoint that is the point given in parameter multiplied by the matrix. But the original point and the matrix aren't modified.
DOMMatrixReadOnly.translate()
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.

Specifications

Specification Status Comment
Geometry Interfaces Module Level 1
The definition of 'DOMMatrixReadOnly' in that specification.
Candidate Recommendation Initial definition

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
DOMMatrixReadOnlyChrome Full support 45Edge No support NoFirefox Full support 33IE No support NoOpera Full support 32Safari Full support 11WebView Android Full support 45Chrome Android Full support 45Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
Support in web workersChrome Full support 57Edge No support NoFirefox No support NoIE No support NoOpera Full support 44Safari Full support 11WebView Android Full support 57Chrome Android Full support 57Firefox Android No support NoOpera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
DOMMatrixReadOnly() constructorChrome Full support 57Edge No support NoFirefox Full support 33IE No support NoOpera Full support 44Safari Full support 11WebView Android Full support 57Chrome Android Full support 57Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
m11Chrome Full support 45Edge No support NoFirefox Full support 33IE No support NoOpera Full support 32Safari Full support 11WebView Android Full support 45Chrome Android Full support 45Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
m12Chrome Full support 45Edge No support NoFirefox Full support 33IE No support NoOpera Full support 32Safari Full support 11WebView Android Full support 45Chrome Android Full support 45Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
m13Chrome Full support 45Edge No support NoFirefox Full support 33IE No support NoOpera Full support 32Safari Full support 11WebView Android Full support 45Chrome Android Full support 45Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
m14Chrome Full support 45Edge No support NoFirefox Full support 33IE No support NoOpera Full support 32Safari Full support 11WebView Android Full support 45Chrome Android Full support 45Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
m21Chrome Full support 45Edge No support NoFirefox Full support 33IE No support NoOpera Full support 32Safari Full support 11WebView Android Full support 45Chrome Android Full support 45Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
m22Chrome Full support 45Edge No support NoFirefox Full support 33IE No support NoOpera Full support 32Safari Full support 11WebView Android Full support 45Chrome Android Full support 45Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
m23Chrome Full support 45Edge No support NoFirefox Full support 33IE No support NoOpera Full support 32Safari Full support 11WebView Android Full support 45Chrome Android Full support 45Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
m24Chrome Full support 45Edge No support NoFirefox Full support 33IE No support NoOpera Full support 32Safari Full support 11WebView Android Full support 45Chrome Android Full support 45Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
m31Chrome Full support 45Edge No support NoFirefox Full support 33IE No support NoOpera Full support 32Safari Full support 11WebView Android Full support 45Chrome Android Full support 45Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
m32Chrome Full support 45Edge No support NoFirefox Full support 33IE No support NoOpera Full support 32Safari Full support 11WebView Android Full support 45Chrome Android Full support 45Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
m33Chrome Full support 45Edge No support NoFirefox Full support 33IE No support NoOpera Full support 32Safari Full support 11WebView Android Full support 45Chrome Android Full support 45Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
m34Chrome Full support 45Edge No support NoFirefox Full support 33IE No support NoOpera Full support 32Safari Full support 11WebView Android Full support 45Chrome Android Full support 45Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
m41Chrome Full support 61Edge No support NoFirefox Full support 33IE No support NoOpera Full support 48Safari Full support 11WebView Android Full support 61Chrome Android Full support 61Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
m42Chrome Full support 61Edge No support NoFirefox Full support 33IE No support NoOpera Full support 48Safari Full support 11WebView Android Full support 61Chrome Android Full support 61Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
m43Chrome Full support 61Edge No support NoFirefox Full support 33IE No support NoOpera Full support 48Safari Full support 11WebView Android Full support 61Chrome Android Full support 61Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
m44Chrome Full support 61Edge No support NoFirefox Full support 33IE No support NoOpera Full support 48Safari Full support 11WebView Android Full support 61Chrome Android Full support 61Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
aChrome Full support 45Edge No support NoFirefox Full support 33IE No support NoOpera Full support 32Safari Full support 11WebView Android Full support 45Chrome Android Full support 45Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
bChrome Full support 45Edge No support NoFirefox Full support 33IE No support NoOpera Full support 32Safari Full support 11WebView Android Full support 45Chrome Android Full support 45Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
cChrome Full support 45Edge No support NoFirefox Full support 33IE No support NoOpera Full support 32Safari Full support 11WebView Android Full support 45Chrome Android Full support 45Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
dChrome Full support 45Edge No support NoFirefox Full support 33IE No support NoOpera Full support 32Safari Full support 11WebView Android Full support 45Chrome Android Full support 45Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
eChrome Full support 45Edge No support NoFirefox Full support 33IE No support NoOpera Full support 32Safari Full support 11WebView Android Full support 45Chrome Android Full support 45Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
fChrome Full support 45Edge No support NoFirefox Full support 33IE No support NoOpera Full support 32Safari Full support 11WebView Android Full support 45Chrome Android Full support 45Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
is2DChrome Full support 45Edge No support NoFirefox Full support 33IE No support NoOpera Full support 32Safari Full support 11WebView Android Full support 45Chrome Android Full support 45Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
isIdentityChrome Full support 45Edge No support NoFirefox Full support 33IE No support NoOpera Full support 32Safari Full support 11WebView Android Full support 45Chrome Android Full support 45Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
flipXChrome Full support 54Edge No support NoFirefox Full support 33IE No support NoOpera Full support 41Safari Full support 11WebView Android Full support 54Chrome Android Full support 54Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
flipYChrome Full support 54Edge No support NoFirefox Full support 33IE No support NoOpera Full support 41Safari Full support 11WebView Android Full support 54Chrome Android Full support 54Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
inverseChrome Full support 55Edge No support NoFirefox Full support 33IE No support NoOpera Full support 42Safari Full support 11WebView Android Full support 55Chrome Android Full support 55Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
multiplyChrome Full support 45Edge No support NoFirefox Full support 33IE No support NoOpera Full support 32Safari Full support 11WebView Android Full support 45Chrome Android Full support 45Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
rotateChrome Full support 56Edge No support NoFirefox Full support 33IE No support NoOpera Full support 43Safari Full support 11WebView Android Full support 56Chrome Android Full support 56Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
rotateAxisAngleChrome Full support 56Edge No support NoFirefox Full support 33IE No support NoOpera Full support 43Safari Full support 11WebView Android Full support 56Chrome Android Full support 56Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
rotateFromVectorChrome Full support 56Edge No support NoFirefox Full support 33IE No support NoOpera Full support 43Safari Full support 11WebView Android Full support 56Chrome Android Full support 56Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
scaleChrome Full support 45Edge No support NoFirefox Partial support 33
Notes
Partial support 33
Notes
Notes Firefox currently still supports the older three-parameter syntax - DOMMatrix.scale(scaleX[, originX][, originY]) - not the six-parameter version.
IE No support NoOpera Full support 32Safari Full support 11WebView Android Full support 45Chrome Android Full support 45Firefox Android Partial support 33
Notes
Partial support 33
Notes
Notes Firefox currently still supports the older three-parameter syntax - DOMMatrix.scale(scaleX[, originX][, originY]) - not the six-parameter version.
Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
scale3dChrome Full support 45Edge No support NoFirefox Full support 33IE No support NoOpera Full support 32Safari Full support 11WebView Android Full support 45Chrome Android Full support 45Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
scaleNonUniformChrome No support 45 — 56Edge No support NoFirefox Full support 33IE No support NoOpera No support 32 — 43Safari No support NoWebView Android No support 45 — 56Chrome Android No support 45 — 56Firefox Android Full support 33Opera Android Full support 45Safari iOS No support NoSamsung Internet Android ?
skewXChrome Full support 54Edge No support NoFirefox Full support 33IE No support NoOpera Full support 41Safari Full support 11WebView Android Full support 54Chrome Android Full support 54Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
skewYChrome Full support 54Edge No support NoFirefox Full support 33IE No support NoOpera Full support 41Safari Full support 11WebView Android Full support 54Chrome Android Full support 54Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
toFloat32ArrayChrome Full support 45Edge No support NoFirefox Full support 33IE No support NoOpera Full support 32Safari Full support 11WebView Android Full support 45Chrome Android Full support 45Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
toFloat64ArrayChrome Full support 45Edge No support NoFirefox Full support 33IE No support NoOpera Full support 32Safari Full support 11WebView Android Full support 45Chrome Android Full support 45Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
toJSONChrome Full support 56Edge No support NoFirefox Full support 33IE No support NoOpera Full support 43Safari Full support 11WebView Android Full support 56Chrome Android Full support 56Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
toStringChrome Full support 54Edge No support NoFirefox Full support 33IE No support NoOpera Full support 41Safari Full support 11WebView Android Full support 54Chrome Android Full support 54Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?
translateChrome Full support 45Edge No support NoFirefox Full support 33IE No support NoOpera Full support 32Safari Full support 11WebView Android Full support 45Chrome Android Full support 45Firefox Android Full support 33Opera Android Full support 32Safari iOS Full support 11Samsung Internet Android ?
transformChrome Full support 61Edge No support NoFirefox Full support 33IE No support NoOpera Full support 48Safari Full support 11WebView Android Full support 61Chrome Android Full support 61Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11Samsung Internet Android ?
transformPointChrome Full support 56Edge No support NoFirefox Full support 33IE No support NoOpera Full support 43Safari Full support 11WebView Android Full support 56Chrome Android Full support 56Firefox Android Full support 33Opera Android Full support 45Safari iOS Full support 11.3Samsung Internet Android ?

Legend

Full support  
Full support
Partial support  
Partial support
No support  
No support
Compatibility unknown  
Compatibility unknown
See implementation notes.
See implementation notes.

See also

Εθελοντές και ετικέτες εγγράφου

Συνεισφέροντες σε αυτή τη σελίδα: mdnwebdocs-bot, mfluehr, connorshea, chrisdavidmills, jpmedley, darrnshn, zbjornson, zsk526, blooddy, jwhitlock, teoli
Τελευταία ενημέρωση από: mdnwebdocs-bot,