Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(605)

Side by Side Diff: third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.h

Issue 2423753002: [GeometryInterface] add transformPoint(point) function. (Closed)
Patch Set: [GeometryInterface] add transformPoint(point) method. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/ExceptionState.h" 8 #include "bindings/core/v8/ExceptionState.h"
9 #include "bindings/core/v8/ScriptWrappable.h" 9 #include "bindings/core/v8/ScriptWrappable.h"
10 #include "core/dom/DOMTypedArray.h" 10 #include "core/dom/DOMTypedArray.h"
11 #include "platform/heap/Handle.h" 11 #include "platform/heap/Handle.h"
12 #include "platform/transforms/TransformationMatrix.h" 12 #include "platform/transforms/TransformationMatrix.h"
13 #include <memory> 13 #include <memory>
14 14
15 namespace blink { 15 namespace blink {
16 16
17 class DOMMatrix; 17 class DOMMatrix;
18 class DOMMatrixInit; 18 class DOMMatrixInit;
19 class DOMPoint;
20 class DOMPointInit;
19 21
20 class CORE_EXPORT DOMMatrixReadOnly 22 class CORE_EXPORT DOMMatrixReadOnly
21 : public GarbageCollectedFinalized<DOMMatrixReadOnly>, 23 : public GarbageCollectedFinalized<DOMMatrixReadOnly>,
22 public ScriptWrappable { 24 public ScriptWrappable {
23 DEFINE_WRAPPERTYPEINFO(); 25 DEFINE_WRAPPERTYPEINFO();
24 26
25 public: 27 public:
26 static DOMMatrixReadOnly* create(Vector<double>, ExceptionState&); 28 static DOMMatrixReadOnly* create(Vector<double>, ExceptionState&);
27 static DOMMatrixReadOnly* fromFloat32Array(DOMFloat32Array*, ExceptionState&); 29 static DOMMatrixReadOnly* fromFloat32Array(DOMFloat32Array*, ExceptionState&);
28 static DOMMatrixReadOnly* fromFloat64Array(DOMFloat64Array*, ExceptionState&); 30 static DOMMatrixReadOnly* fromFloat64Array(DOMFloat64Array*, ExceptionState&);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 DOMMatrix* rotateAxisAngle(double x = 0, 75 DOMMatrix* rotateAxisAngle(double x = 0,
74 double y = 0, 76 double y = 0,
75 double z = 0, 77 double z = 0,
76 double angle = 0); 78 double angle = 0);
77 DOMMatrix* skewX(double sx); 79 DOMMatrix* skewX(double sx);
78 DOMMatrix* skewY(double sy); 80 DOMMatrix* skewY(double sy);
79 DOMMatrix* flipX(); 81 DOMMatrix* flipX();
80 DOMMatrix* flipY(); 82 DOMMatrix* flipY();
81 DOMMatrix* inverse(); 83 DOMMatrix* inverse();
82 84
85 DOMPoint* transformPoint(const DOMPointInit&);
86
83 DOMFloat32Array* toFloat32Array() const; 87 DOMFloat32Array* toFloat32Array() const;
84 DOMFloat64Array* toFloat64Array() const; 88 DOMFloat64Array* toFloat64Array() const;
85 89
86 const String toString() const; 90 const String toString() const;
87 91
88 const TransformationMatrix& matrix() const { return *m_matrix; } 92 const TransformationMatrix& matrix() const { return *m_matrix; }
89 93
90 DEFINE_INLINE_TRACE() {} 94 DEFINE_INLINE_TRACE() {}
91 95
92 protected: 96 protected:
(...skipping 23 matching lines...) Expand all
116 // supports 16-byte alignment but Oilpan doesn't. So we use an std::unique_ptr 120 // supports 16-byte alignment but Oilpan doesn't. So we use an std::unique_ptr
117 // to allocate TransformationMatrix on PartitionAlloc. 121 // to allocate TransformationMatrix on PartitionAlloc.
118 // TODO(oilpan): Oilpan should support 16-byte aligned allocations. 122 // TODO(oilpan): Oilpan should support 16-byte aligned allocations.
119 std::unique_ptr<TransformationMatrix> m_matrix; 123 std::unique_ptr<TransformationMatrix> m_matrix;
120 bool m_is2D; 124 bool m_is2D;
121 }; 125 };
122 126
123 } // namespace blink 127 } // namespace blink
124 128
125 #endif 129 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698