| 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 "core/dom/DOMMatrixInit.h" | 9 #include "core/dom/DOMMatrixInit.h" |
| 10 #include "core/dom/DOMMatrixReadOnly.h" | 10 #include "core/dom/DOMMatrixReadOnly.h" |
| 11 #include "core/dom/MaybeShared.h" |
| 11 | 12 |
| 12 namespace blink { | 13 namespace blink { |
| 13 | 14 |
| 14 class CORE_EXPORT DOMMatrix : public DOMMatrixReadOnly { | 15 class CORE_EXPORT DOMMatrix : public DOMMatrixReadOnly { |
| 15 DEFINE_WRAPPERTYPEINFO(); | 16 DEFINE_WRAPPERTYPEINFO(); |
| 16 | 17 |
| 17 public: | 18 public: |
| 18 static DOMMatrix* create(ExceptionState&); | 19 static DOMMatrix* create(ExceptionState&); |
| 19 static DOMMatrix* create(DOMMatrixReadOnly*, | 20 static DOMMatrix* create(DOMMatrixReadOnly*, |
| 20 ExceptionState& = ASSERT_NO_EXCEPTION); | 21 ExceptionState& = ASSERT_NO_EXCEPTION); |
| 21 static DOMMatrix* create(const SkMatrix44&, ExceptionState&); | 22 static DOMMatrix* create(const SkMatrix44&, ExceptionState&); |
| 22 static DOMMatrix* create(const String&, ExceptionState&); | 23 static DOMMatrix* create(const String&, ExceptionState&); |
| 23 static DOMMatrix* create(Vector<double>, ExceptionState&); | 24 static DOMMatrix* create(Vector<double>, ExceptionState&); |
| 24 static DOMMatrix* fromFloat32Array(DOMFloat32Array*, ExceptionState&); | 25 static DOMMatrix* fromFloat32Array(const MaybeShared<DOMFloat32Array>&, |
| 25 static DOMMatrix* fromFloat64Array(DOMFloat64Array*, ExceptionState&); | 26 ExceptionState&); |
| 27 static DOMMatrix* fromFloat64Array(const MaybeShared<DOMFloat64Array>&, |
| 28 ExceptionState&); |
| 26 static DOMMatrix* fromMatrix(DOMMatrixInit&, ExceptionState&); | 29 static DOMMatrix* fromMatrix(DOMMatrixInit&, ExceptionState&); |
| 27 | 30 |
| 28 void setA(double value) { m_matrix->setM11(value); } | 31 void setA(double value) { m_matrix->setM11(value); } |
| 29 void setB(double value) { m_matrix->setM12(value); } | 32 void setB(double value) { m_matrix->setM12(value); } |
| 30 void setC(double value) { m_matrix->setM21(value); } | 33 void setC(double value) { m_matrix->setM21(value); } |
| 31 void setD(double value) { m_matrix->setM22(value); } | 34 void setD(double value) { m_matrix->setM22(value); } |
| 32 void setE(double value) { m_matrix->setM41(value); } | 35 void setE(double value) { m_matrix->setM41(value); } |
| 33 void setF(double value) { m_matrix->setM42(value); } | 36 void setF(double value) { m_matrix->setM42(value); } |
| 34 | 37 |
| 35 void setM11(double value) { m_matrix->setM11(value); } | 38 void setM11(double value) { m_matrix->setM11(value); } |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 template <typename T> | 115 template <typename T> |
| 113 DOMMatrix(T sequence, int size); | 116 DOMMatrix(T sequence, int size); |
| 114 | 117 |
| 115 void setIs2D(bool value); | 118 void setIs2D(bool value); |
| 116 void setNAN(); | 119 void setNAN(); |
| 117 }; | 120 }; |
| 118 | 121 |
| 119 } // namespace blink | 122 } // namespace blink |
| 120 | 123 |
| 121 #endif | 124 #endif |
| OLD | NEW |