| 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 DOMMatrix_h | 5 #ifndef DOMMatrix_h |
| 6 #define DOMMatrix_h | 6 #define DOMMatrix_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ExceptionState.h" | 8 #include "bindings/core/v8/ExceptionState.h" |
| 9 #include "bindings/core/v8/StringOrUnrestrictedDoubleSequence.h" | 9 #include "bindings/core/v8/StringOrUnrestrictedDoubleSequence.h" |
| 10 #include "core/dom/ArrayBufferViewHelpers.h" | 10 #include "core/dom/ArrayBufferViewHelpers.h" |
| 11 #include "core/geometry/DOMMatrixInit.h" | 11 #include "core/geometry/DOMMatrixInit.h" |
| 12 #include "core/geometry/DOMMatrixReadOnly.h" | 12 #include "core/geometry/DOMMatrixReadOnly.h" |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 | 15 |
| 16 class CORE_EXPORT DOMMatrix : public DOMMatrixReadOnly { | 16 class CORE_EXPORT DOMMatrix : public DOMMatrixReadOnly { |
| 17 DEFINE_WRAPPERTYPEINFO(); | 17 DEFINE_WRAPPERTYPEINFO(); |
| 18 | 18 |
| 19 public: | 19 public: |
| 20 static DOMMatrix* Create(); |
| 20 static DOMMatrix* Create(ExecutionContext*, ExceptionState&); | 21 static DOMMatrix* Create(ExecutionContext*, ExceptionState&); |
| 21 static DOMMatrix* Create(ExecutionContext*, | 22 static DOMMatrix* Create(ExecutionContext*, |
| 22 StringOrUnrestrictedDoubleSequence&, | 23 StringOrUnrestrictedDoubleSequence&, |
| 23 ExceptionState&); | 24 ExceptionState&); |
| 24 // TODO(fserb): double check those two bellow are needed: | 25 // TODO(fserb): double check those two bellow are needed: |
| 25 static DOMMatrix* Create(DOMMatrixReadOnly*, | 26 static DOMMatrix* Create(DOMMatrixReadOnly*, |
| 26 ExceptionState& = ASSERT_NO_EXCEPTION); | 27 ExceptionState& = ASSERT_NO_EXCEPTION); |
| 27 static DOMMatrix* Create(const SkMatrix44&, ExceptionState&); | 28 static DOMMatrix* Create(const SkMatrix44&, ExceptionState&); |
| 28 static DOMMatrix* fromFloat32Array(NotShared<DOMFloat32Array>, | 29 static DOMMatrix* fromFloat32Array(NotShared<DOMFloat32Array>, |
| 29 ExceptionState&); | 30 ExceptionState&); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 void setM43(double value) { | 81 void setM43(double value) { |
| 81 matrix_->SetM43(value); | 82 matrix_->SetM43(value); |
| 82 SetIs2D(!value); | 83 SetIs2D(!value); |
| 83 } | 84 } |
| 84 void setM44(double value) { | 85 void setM44(double value) { |
| 85 matrix_->SetM44(value); | 86 matrix_->SetM44(value); |
| 86 SetIs2D(value != 1); | 87 SetIs2D(value != 1); |
| 87 } | 88 } |
| 88 | 89 |
| 89 DOMMatrix* multiplySelf(DOMMatrixInit&, ExceptionState&); | 90 DOMMatrix* multiplySelf(DOMMatrixInit&, ExceptionState&); |
| 91 DOMMatrix* multiplySelf(DOMMatrix* other_matrix); |
| 90 DOMMatrix* preMultiplySelf(DOMMatrixInit&, ExceptionState&); | 92 DOMMatrix* preMultiplySelf(DOMMatrixInit&, ExceptionState&); |
| 91 DOMMatrix* translateSelf(double tx = 0, double ty = 0, double tz = 0); | 93 DOMMatrix* translateSelf(double tx = 0, double ty = 0, double tz = 0); |
| 92 DOMMatrix* scaleSelf(double sx = 1); | 94 DOMMatrix* scaleSelf(double sx = 1); |
| 93 DOMMatrix* scaleSelf(double sx, | 95 DOMMatrix* scaleSelf(double sx, |
| 94 double sy, | 96 double sy, |
| 95 double sz = 1, | 97 double sz = 1, |
| 96 double ox = 0, | 98 double ox = 0, |
| 97 double oy = 0, | 99 double oy = 0, |
| 98 double oz = 0); | 100 double oz = 0); |
| 99 DOMMatrix* scale3dSelf(double scale = 1, | 101 DOMMatrix* scale3dSelf(double scale = 1, |
| (...skipping 19 matching lines...) Expand all Loading... |
| 119 template <typename T> | 121 template <typename T> |
| 120 DOMMatrix(T sequence, int size); | 122 DOMMatrix(T sequence, int size); |
| 121 | 123 |
| 122 void SetIs2D(bool value); | 124 void SetIs2D(bool value); |
| 123 void SetNAN(); | 125 void SetNAN(); |
| 124 }; | 126 }; |
| 125 | 127 |
| 126 } // namespace blink | 128 } // namespace blink |
| 127 | 129 |
| 128 #endif | 130 #endif |
| OLD | NEW |