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 #ifndef DOMMatrixReadOnly_h | 5 #ifndef DOMMatrixReadOnly_h |
6 #define DOMMatrixReadOnly_h | 6 #define DOMMatrixReadOnly_h |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include "bindings/core/v8/ExceptionState.h" | 9 #include "bindings/core/v8/ExceptionState.h" |
10 #include "bindings/core/v8/StringOrUnrestrictedDoubleSequence.h" | 10 #include "bindings/core/v8/StringOrUnrestrictedDoubleSequence.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
57 double m32() const { return matrix_->M32(); } | 57 double m32() const { return matrix_->M32(); } |
58 double m33() const { return matrix_->M33(); } | 58 double m33() const { return matrix_->M33(); } |
59 double m34() const { return matrix_->M34(); } | 59 double m34() const { return matrix_->M34(); } |
60 double m41() const { return matrix_->M41(); } | 60 double m41() const { return matrix_->M41(); } |
61 double m42() const { return matrix_->M42(); } | 61 double m42() const { return matrix_->M42(); } |
62 double m43() const { return matrix_->M43(); } | 62 double m43() const { return matrix_->M43(); } |
63 double m44() const { return matrix_->M44(); } | 63 double m44() const { return matrix_->M44(); } |
64 | 64 |
65 bool is2D() const; | 65 bool is2D() const; |
66 bool isIdentity() const; | 66 bool isIdentity() const; |
67 bool isNaNorInf(double x) const; | |
zino
2017/05/16 22:25:37
nit: Please remove this?
Byoungkwon Ko
2017/05/18 13:52:14
Done.
| |
67 | 68 |
68 DOMMatrix* multiply(DOMMatrixInit&, ExceptionState&); | 69 DOMMatrix* multiply(DOMMatrixInit&, ExceptionState&); |
69 DOMMatrix* translate(double tx = 0, double ty = 0, double tz = 0); | 70 DOMMatrix* translate(double tx = 0, double ty = 0, double tz = 0); |
70 DOMMatrix* scale(double sx = 1); | 71 DOMMatrix* scale(double sx = 1); |
71 DOMMatrix* scale(double sx, | 72 DOMMatrix* scale(double sx, |
72 double sy, | 73 double sy, |
73 double sz = 1, | 74 double sz = 1, |
74 double ox = 0, | 75 double ox = 0, |
75 double oy = 0, | 76 double oy = 0, |
76 double oz = 0); | 77 double oz = 0); |
(...skipping 13 matching lines...) Expand all Loading... | |
90 DOMMatrix* skewY(double sy); | 91 DOMMatrix* skewY(double sy); |
91 DOMMatrix* flipX(); | 92 DOMMatrix* flipX(); |
92 DOMMatrix* flipY(); | 93 DOMMatrix* flipY(); |
93 DOMMatrix* inverse(); | 94 DOMMatrix* inverse(); |
94 | 95 |
95 DOMPoint* transformPoint(const DOMPointInit&); | 96 DOMPoint* transformPoint(const DOMPointInit&); |
96 | 97 |
97 NotShared<DOMFloat32Array> toFloat32Array() const; | 98 NotShared<DOMFloat32Array> toFloat32Array() const; |
98 NotShared<DOMFloat64Array> toFloat64Array() const; | 99 NotShared<DOMFloat64Array> toFloat64Array() const; |
99 | 100 |
100 const String toString() const; | 101 const String toString(ExceptionState&) const; |
101 | 102 |
102 ScriptValue toJSONForBinding(ScriptState*) const; | 103 ScriptValue toJSONForBinding(ScriptState*) const; |
103 | 104 |
104 const TransformationMatrix& Matrix() const { return *matrix_; } | 105 const TransformationMatrix& Matrix() const { return *matrix_; } |
105 | 106 |
106 DEFINE_INLINE_TRACE() {} | 107 DEFINE_INLINE_TRACE() {} |
107 | 108 |
108 protected: | 109 protected: |
109 DOMMatrixReadOnly() {} | 110 DOMMatrixReadOnly() {} |
110 DOMMatrixReadOnly(const String&, ExceptionState&); | 111 DOMMatrixReadOnly(const String&, ExceptionState&); |
(...skipping 25 matching lines...) Expand all Loading... | |
136 // supports 16-byte alignment but Oilpan doesn't. So we use an std::unique_ptr | 137 // supports 16-byte alignment but Oilpan doesn't. So we use an std::unique_ptr |
137 // to allocate TransformationMatrix on PartitionAlloc. | 138 // to allocate TransformationMatrix on PartitionAlloc. |
138 // TODO(oilpan): Oilpan should support 16-byte aligned allocations. | 139 // TODO(oilpan): Oilpan should support 16-byte aligned allocations. |
139 std::unique_ptr<TransformationMatrix> matrix_; | 140 std::unique_ptr<TransformationMatrix> matrix_; |
140 bool is2d_; | 141 bool is2d_; |
141 }; | 142 }; |
142 | 143 |
143 } // namespace blink | 144 } // namespace blink |
144 | 145 |
145 #endif | 146 #endif |
OLD | NEW |