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

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

Issue 426063007: Implement basic interfaces and attributes for DOMMatrix. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add is2d test Created 6 years, 4 months 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
« no previous file with comments | « Source/core/dom/DOMMatrix.idl ('k') | Source/core/dom/DOMMatrixReadOnly.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef DOMMatrixReadOnly_h
6 #define DOMMatrixReadOnly_h
7
8 #include "platform/heap/Handle.h"
9
10 namespace blink {
11
12 class DOMMatrixReadOnly : public GarbageCollected<DOMMatrixReadOnly> {
13 public:
14 double a() const { return m11(); }
15 double b() const { return m12(); }
16 double c() const { return m21(); }
17 double d() const { return m22(); }
18 double e() const { return m41(); }
19 double f() const { return m42(); }
20
21 double m11() const { return m_matrix[0][0]; }
22 double m12() const { return m_matrix[0][1]; }
23 double m13() const { return m_matrix[0][2]; }
24 double m14() const { return m_matrix[0][3]; }
25 double m21() const { return m_matrix[1][0]; }
26 double m22() const { return m_matrix[1][1]; }
27 double m23() const { return m_matrix[1][2]; }
28 double m24() const { return m_matrix[1][3]; }
29 double m31() const { return m_matrix[2][0]; }
30 double m32() const { return m_matrix[2][1]; }
31 double m33() const { return m_matrix[2][2]; }
32 double m34() const { return m_matrix[2][3]; }
33 double m41() const { return m_matrix[3][0]; }
34 double m42() const { return m_matrix[3][1]; }
35 double m43() const { return m_matrix[3][2]; }
36 double m44() const { return m_matrix[3][3]; }
37
38 bool is2D() const;
39 bool isIdentity() const;
40
41 void trace(Visitor*) { }
42
43 protected:
44 double m_matrix[4][4];
45 bool m_is2D;
46 };
47
48 } // namespace blink
49
50 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/DOMMatrix.idl ('k') | Source/core/dom/DOMMatrixReadOnly.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698