| 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 "core/dom/DOMMatrixReadOnly.h" | 8 #include "core/dom/DOMMatrixReadOnly.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 class DOMMatrix : public DOMMatrixReadOnly { | 12 class DOMMatrix : public DOMMatrixReadOnly { |
| 13 DEFINE_WRAPPERTYPEINFO(); | 13 DEFINE_WRAPPERTYPEINFO(); |
| 14 public: | 14 public: |
| 15 static DOMMatrix* create(); | 15 static DOMMatrix* create(); |
| 16 static DOMMatrix* create(DOMMatrixReadOnly*); | 16 static DOMMatrix* create(DOMMatrixReadOnly*); |
| 17 static DOMMatrix* create(const SkMatrix44&); | 17 static DOMMatrix* create(const SkMatrix44&); |
| 18 static DOMMatrix* fromFloat32Array(DOMFloat32Array*, ExceptionState&); |
| 19 static DOMMatrix* fromFloat64Array(DOMFloat64Array*, ExceptionState&); |
| 18 | 20 |
| 19 void setA(double value) { m_matrix->setM11(value); } | 21 void setA(double value) { m_matrix->setM11(value); } |
| 20 void setB(double value) { m_matrix->setM12(value); } | 22 void setB(double value) { m_matrix->setM12(value); } |
| 21 void setC(double value) { m_matrix->setM21(value); } | 23 void setC(double value) { m_matrix->setM21(value); } |
| 22 void setD(double value) { m_matrix->setM22(value); } | 24 void setD(double value) { m_matrix->setM22(value); } |
| 23 void setE(double value) { m_matrix->setM41(value); } | 25 void setE(double value) { m_matrix->setM41(value); } |
| 24 void setF(double value) { m_matrix->setM42(value); } | 26 void setF(double value) { m_matrix->setM42(value); } |
| 25 | 27 |
| 26 void setM11(double value) { m_matrix->setM11(value); } | 28 void setM11(double value) { m_matrix->setM11(value); } |
| 27 void setM12(double value) { m_matrix->setM12(value); } | 29 void setM12(double value) { m_matrix->setM12(value); } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 46 DOMMatrix* scaleSelf(double scale, double ox = 0, double oy = 0); | 48 DOMMatrix* scaleSelf(double scale, double ox = 0, double oy = 0); |
| 47 DOMMatrix* scale3dSelf(double scale, double ox = 0, double oy = 0, double oz
= 0); | 49 DOMMatrix* scale3dSelf(double scale, double ox = 0, double oy = 0, double oz
= 0); |
| 48 DOMMatrix* scaleNonUniformSelf(double sx, double sy = 1, double sz = 1, | 50 DOMMatrix* scaleNonUniformSelf(double sx, double sy = 1, double sz = 1, |
| 49 double ox = 0, double oy = 0, double oz = 0); | 51 double ox = 0, double oy = 0, double oz = 0); |
| 50 DOMMatrix* skewXSelf(double sx = 0); | 52 DOMMatrix* skewXSelf(double sx = 0); |
| 51 DOMMatrix* skewYSelf(double sy = 0); | 53 DOMMatrix* skewYSelf(double sy = 0); |
| 52 DOMMatrix* invertSelf(); | 54 DOMMatrix* invertSelf(); |
| 53 | 55 |
| 54 private: | 56 private: |
| 55 DOMMatrix(const TransformationMatrix&, bool is2D = true); | 57 DOMMatrix(const TransformationMatrix&, bool is2D = true); |
| 58 DOMMatrix(DOMFloat32Array*); |
| 59 DOMMatrix(DOMFloat64Array*); |
| 56 | 60 |
| 57 void setIs2D(bool value); | 61 void setIs2D(bool value); |
| 58 }; | 62 }; |
| 59 | 63 |
| 60 } // namespace blink | 64 } // namespace blink |
| 61 | 65 |
| 62 #endif | 66 #endif |
| OLD | NEW |