| 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 "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
| 9 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
| 10 #include "platform/transforms/TransformationMatrix.h" | 10 #include "platform/transforms/TransformationMatrix.h" |
| 11 #include "wtf/Float32Array.h" |
| 12 #include "wtf/Float64Array.h" |
| 11 | 13 |
| 12 namespace blink { | 14 namespace blink { |
| 13 | 15 |
| 14 class DOMMatrix; | 16 class DOMMatrix; |
| 15 | 17 |
| 16 class DOMMatrixReadOnly : public GarbageCollected<DOMMatrixReadOnly>, public Scr
iptWrappableBase { | 18 class DOMMatrixReadOnly : public GarbageCollected<DOMMatrixReadOnly>, public Scr
iptWrappableBase { |
| 17 public: | 19 public: |
| 18 double a() const { return m_matrix.m11(); } | 20 double a() const { return m_matrix.m11(); } |
| 19 double b() const { return m_matrix.m12(); } | 21 double b() const { return m_matrix.m12(); } |
| 20 double c() const { return m_matrix.m21(); } | 22 double c() const { return m_matrix.m21(); } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 41 | 43 |
| 42 bool is2D() const; | 44 bool is2D() const; |
| 43 bool isIdentity() const; | 45 bool isIdentity() const; |
| 44 | 46 |
| 45 DOMMatrix* translate(double tx, double ty, double tz = 0); | 47 DOMMatrix* translate(double tx, double ty, double tz = 0); |
| 46 DOMMatrix* scale(double scale, double ox = 0, double oy = 0); | 48 DOMMatrix* scale(double scale, double ox = 0, double oy = 0); |
| 47 DOMMatrix* scale3d(double scale, double ox = 0, double oy = 0, double oz = 0
); | 49 DOMMatrix* scale3d(double scale, double ox = 0, double oy = 0, double oz = 0
); |
| 48 DOMMatrix* scaleNonUniform(double sx, double sy = 1, double sz = 1, | 50 DOMMatrix* scaleNonUniform(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 | 52 |
| 53 PassRefPtr<Float32Array> toFloat32Array() const; |
| 54 PassRefPtr<Float64Array> toFloat64Array() const; |
| 55 |
| 51 const TransformationMatrix& matrix() const { return m_matrix; } | 56 const TransformationMatrix& matrix() const { return m_matrix; } |
| 52 | 57 |
| 53 void trace(Visitor*) { } | 58 void trace(Visitor*) { } |
| 54 | 59 |
| 55 protected: | 60 protected: |
| 56 TransformationMatrix m_matrix; | 61 TransformationMatrix m_matrix; |
| 57 bool m_is2D; | 62 bool m_is2D; |
| 58 }; | 63 }; |
| 59 | 64 |
| 60 } // namespace blink | 65 } // namespace blink |
| 61 | 66 |
| 62 #endif | 67 #endif |
| OLD | NEW |