Serenity Operating System
1#import <Geometry/DOMMatrixReadOnly.idl>
2
3// https://drafts.fxtf.org/geometry/#dommatrix
4// FIXME: LegacyWindowAlias currently doesn't do anything.
5[Exposed=(Window,Worker), Serializable, LegacyWindowAlias=(SVGMatrix, WebKitCSSMatrix), UseNewAKString]
6interface DOMMatrix : DOMMatrixReadOnly {
7 constructor(optional (DOMString or sequence<unrestricted double>) init);
8
9 // FIXME: [NewObject] static DOMMatrix fromMatrix(optional DOMMatrixInit other = {});
10 // FIXME: [NewObject] static DOMMatrix fromFloat32Array(Float32Array array32);
11 // FIXME: [NewObject] static DOMMatrix fromFloat64Array(Float64Array array64);
12
13 // These attributes are simple aliases for certain elements of the 4x4 matrix
14 inherit attribute unrestricted double a;
15 inherit attribute unrestricted double b;
16 inherit attribute unrestricted double c;
17 inherit attribute unrestricted double d;
18 inherit attribute unrestricted double e;
19 inherit attribute unrestricted double f;
20
21 inherit attribute unrestricted double m11;
22 inherit attribute unrestricted double m12;
23 inherit attribute unrestricted double m13;
24 inherit attribute unrestricted double m14;
25 inherit attribute unrestricted double m21;
26 inherit attribute unrestricted double m22;
27 inherit attribute unrestricted double m23;
28 inherit attribute unrestricted double m24;
29 inherit attribute unrestricted double m31;
30 inherit attribute unrestricted double m32;
31 inherit attribute unrestricted double m33;
32 inherit attribute unrestricted double m34;
33 inherit attribute unrestricted double m41;
34 inherit attribute unrestricted double m42;
35 inherit attribute unrestricted double m43;
36 inherit attribute unrestricted double m44;
37
38 // Mutable transform methods
39 // FIXME: DOMMatrix multiplySelf(optional DOMMatrixInit other = {});
40 // FIXME: DOMMatrix preMultiplySelf(optional DOMMatrixInit other = {});
41 // FIXME: DOMMatrix translateSelf(optional unrestricted double tx = 0, optional unrestricted double ty = 0, optional unrestricted double tz = 0);
42 // FIXME: DOMMatrix scaleSelf(optional unrestricted double scaleX = 1, optional unrestricted double scaleY, optional unrestricted double scaleZ = 1, optional unrestricted double originX = 0, optional unrestricted double originY = 0, optional unrestricted double originZ = 0);
43 // FIXME: DOMMatrix scale3dSelf(optional unrestricted double scale = 1, optional unrestricted double originX = 0, optional unrestricted double originY = 0, optional unrestricted double originZ = 0);
44 // FIXME: DOMMatrix rotateSelf(optional unrestricted double rotX = 0, optional unrestricted double rotY, optional unrestricted double rotZ);
45 // FIXME: DOMMatrix rotateFromVectorSelf(optional unrestricted double x = 0, optional unrestricted double y = 0);
46 // FIXME: DOMMatrix rotateAxisAngleSelf(optional unrestricted double x = 0, optional unrestricted double y = 0, optional unrestricted double z = 0, optional unrestricted double angle = 0);
47 // FIXME: DOMMatrix skewXSelf(optional unrestricted double sx = 0);
48 // FIXME: DOMMatrix skewYSelf(optional unrestricted double sy = 0);
49 DOMMatrix invertSelf();
50
51 // FIXME: [Exposed=Window] DOMMatrix setMatrixValue(DOMString transformList);
52};