OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // http://dev.w3.org/fxtf/geometry/#DOMMatrix | 5 // http://dev.w3.org/fxtf/geometry/#DOMMatrix |
6 | 6 |
7 [ | 7 [ |
8 Constructor, | 8 Constructor, |
9 Constructor(DOMMatrixReadOnly other), | 9 Constructor(DOMMatrixReadOnly other), |
10 // FIXME: Should implement more constructors (See: crbug.com/388780) | 10 // FIXME: Should implement more constructors (See: crbug.com/388780) |
11 // FIXME: Exposed=(Window,Worker) | 11 // FIXME: Exposed=(Window,Worker) |
12 RuntimeEnabled=GeometryInterfaces, | 12 RuntimeEnabled=GeometryInterfaces, |
13 ] interface DOMMatrix : DOMMatrixReadOnly { | 13 ] interface DOMMatrix : DOMMatrixReadOnly { |
14 [RaisesException, NewObject] static DOMMatrix fromFloat32Array(Float32Array
array32); | 14 [RaisesException, NewObject] static DOMMatrix fromFloat32Array(Float32Array
array32); |
15 [RaisesException, NewObject] static DOMMatrix fromFloat64Array(Float64Array
array64); | 15 [RaisesException, NewObject] static DOMMatrix fromFloat64Array(Float64Array
array64); |
| 16 [RaisesException, NewObject] static DOMMatrix fromMatrix(optional DOMMatrixI
nit other); |
16 | 17 |
17 // These attributes are simple aliases for certain elements of the 4x4 matri
x | 18 // These attributes are simple aliases for certain elements of the 4x4 matri
x |
18 inherit attribute unrestricted double a; | 19 inherit attribute unrestricted double a; |
19 inherit attribute unrestricted double b; | 20 inherit attribute unrestricted double b; |
20 inherit attribute unrestricted double c; | 21 inherit attribute unrestricted double c; |
21 inherit attribute unrestricted double d; | 22 inherit attribute unrestricted double d; |
22 inherit attribute unrestricted double e; | 23 inherit attribute unrestricted double e; |
23 inherit attribute unrestricted double f; | 24 inherit attribute unrestricted double f; |
24 | 25 |
25 inherit attribute unrestricted double m11; | 26 inherit attribute unrestricted double m11; |
26 inherit attribute unrestricted double m12; | 27 inherit attribute unrestricted double m12; |
27 inherit attribute unrestricted double m13; | 28 inherit attribute unrestricted double m13; |
28 inherit attribute unrestricted double m14; | 29 inherit attribute unrestricted double m14; |
29 inherit attribute unrestricted double m21; | 30 inherit attribute unrestricted double m21; |
30 inherit attribute unrestricted double m22; | 31 inherit attribute unrestricted double m22; |
31 inherit attribute unrestricted double m23; | 32 inherit attribute unrestricted double m23; |
32 inherit attribute unrestricted double m24; | 33 inherit attribute unrestricted double m24; |
33 inherit attribute unrestricted double m31; | 34 inherit attribute unrestricted double m31; |
34 inherit attribute unrestricted double m32; | 35 inherit attribute unrestricted double m32; |
35 inherit attribute unrestricted double m33; | 36 inherit attribute unrestricted double m33; |
36 inherit attribute unrestricted double m34; | 37 inherit attribute unrestricted double m34; |
37 inherit attribute unrestricted double m41; | 38 inherit attribute unrestricted double m41; |
38 inherit attribute unrestricted double m42; | 39 inherit attribute unrestricted double m42; |
39 inherit attribute unrestricted double m43; | 40 inherit attribute unrestricted double m43; |
40 inherit attribute unrestricted double m44; | 41 inherit attribute unrestricted double m44; |
41 | 42 |
42 // FIXME: Should implement some methods (See: crbug.com/388780) | 43 // TODO(zino): Should implement rotateSelf() method (See: crbug.com/645878) |
| 44 // TODO(zino): Should implement rotateFromVectorSelf() method (See: crbug.co
m/645882) |
| 45 // TODO(zino): Should implement rotateAxisAngleSelf() method (See: crbug.com
/645883) |
| 46 // TODO(zino): Should implement setMatrixValue() method (See: crbug.com/6458
84) |
| 47 // TODO(zino): Should remove scaleNonUniformSelf() method (See: crbug.com/64
5887) |
43 // Mutable transform methods | 48 // Mutable transform methods |
44 DOMMatrix multiplySelf(DOMMatrix other); | 49 [RaisesException] DOMMatrix multiplySelf(optional DOMMatrixInit other); |
45 DOMMatrix preMultiplySelf(DOMMatrix other); | 50 [RaisesException] DOMMatrix preMultiplySelf(optional DOMMatrixInit other); |
46 DOMMatrix translateSelf(unrestricted double tx, | 51 DOMMatrix translateSelf(unrestricted double tx, |
47 unrestricted double ty, | 52 unrestricted double ty, |
48 optional unrestricted double tz = 0); | 53 optional unrestricted double tz = 0); |
49 DOMMatrix scaleSelf(unrestricted double scale, | 54 DOMMatrix scaleSelf(unrestricted double scale, |
50 optional unrestricted double originX = 0, | 55 optional unrestricted double originX = 0, |
51 optional unrestricted double originY = 0); | 56 optional unrestricted double originY = 0); |
52 DOMMatrix scale3dSelf(unrestricted double scale, | 57 DOMMatrix scale3dSelf(unrestricted double scale, |
53 optional unrestricted double originX = 0, | 58 optional unrestricted double originX = 0, |
54 optional unrestricted double originY = 0, | 59 optional unrestricted double originY = 0, |
55 optional unrestricted double originZ = 0); | 60 optional unrestricted double originZ = 0); |
56 DOMMatrix scaleNonUniformSelf(unrestricted double scaleX, | 61 DOMMatrix scaleNonUniformSelf(unrestricted double scaleX, |
57 optional unrestricted double scaleY = 1, | 62 optional unrestricted double scaleY = 1, |
58 optional unrestricted double scaleZ = 1, | 63 optional unrestricted double scaleZ = 1, |
59 optional unrestricted double originX = 0, | 64 optional unrestricted double originX = 0, |
60 optional unrestricted double originY = 0, | 65 optional unrestricted double originY = 0, |
61 optional unrestricted double originZ = 0); | 66 optional unrestricted double originZ = 0); |
62 DOMMatrix skewXSelf(optional unrestricted double sx = 0); | 67 DOMMatrix skewXSelf(optional unrestricted double sx = 0); |
63 DOMMatrix skewYSelf(optional unrestricted double sy = 0); | 68 DOMMatrix skewYSelf(optional unrestricted double sy = 0); |
64 DOMMatrix invertSelf(); | 69 DOMMatrix invertSelf(); |
65 }; | 70 }; |
OLD | NEW |