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

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

Issue 2283363004: GeometryInterace: Add rotate methods. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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
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 #include "core/dom/DOMMatrix.h" 5 #include "core/dom/DOMMatrix.h"
6 6
7 namespace blink { 7 namespace blink {
8 8
9 DOMMatrixReadOnly* DOMMatrixReadOnly::create(Vector<double> sequence, ExceptionS tate& exceptionState) 9 DOMMatrixReadOnly* DOMMatrixReadOnly::create(Vector<double> sequence, ExceptionS tate& exceptionState)
10 { 10 {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 { 67 {
68 return DOMMatrix::create(this)->scale3dSelf(scale, ox, oy, oz); 68 return DOMMatrix::create(this)->scale3dSelf(scale, ox, oy, oz);
69 } 69 }
70 70
71 DOMMatrix* DOMMatrixReadOnly::scaleNonUniform(double sx, double sy, double sz, 71 DOMMatrix* DOMMatrixReadOnly::scaleNonUniform(double sx, double sy, double sz,
72 double ox, double oy, double oz) 72 double ox, double oy, double oz)
73 { 73 {
74 return DOMMatrix::create(this)->scaleNonUniformSelf(sx, sy, sz, ox, oy, oz); 74 return DOMMatrix::create(this)->scaleNonUniformSelf(sx, sy, sz, ox, oy, oz);
75 } 75 }
76 76
77 DOMMatrix* DOMMatrixReadOnly::rotate(double rotX)
78 {
79 return DOMMatrix::create(this)->rotateSelf(rotX);
80 }
81
82 DOMMatrix* DOMMatrixReadOnly::rotate(double rotX, double rotY)
83 {
84 return DOMMatrix::create(this)->rotateSelf(rotX, rotY);
85 }
86
87 DOMMatrix* DOMMatrixReadOnly::rotate(double rotX, double rotY, double rotZ)
88 {
89 return DOMMatrix::create(this)->rotateSelf(rotX, rotY, rotZ);
90 }
91
92 DOMMatrix* DOMMatrixReadOnly::rotateFromVector(double x, double y)
93 {
94 return DOMMatrix::create(this)->rotateFromVectorSelf(x, y);
95 }
96
97 DOMMatrix* DOMMatrixReadOnly::rotateAxisAngle(double x, double y, double z, doub le angle)
98 {
99 return DOMMatrix::create(this)->rotateAxisAngleSelf(x, y, z, angle);
100 }
101
77 DOMMatrix* DOMMatrixReadOnly::flipX() 102 DOMMatrix* DOMMatrixReadOnly::flipX()
78 { 103 {
79 DOMMatrix* flipX = DOMMatrix::create(this); 104 DOMMatrix* flipX = DOMMatrix::create(this);
80 flipX->setM11(-this->m11()); 105 flipX->setM11(-this->m11());
81 flipX->setM12(-this->m12()); 106 flipX->setM12(-this->m12());
82 flipX->setM13(-this->m13()); 107 flipX->setM13(-this->m13());
83 flipX->setM14(-this->m14()); 108 flipX->setM14(-this->m14());
84 return flipX; 109 return flipX;
85 } 110 }
86 111
(...skipping 25 matching lines...) Expand all
112 m_matrix->m11(), m_matrix->m12(), m_matrix->m13(), m_matrix->m14(), 137 m_matrix->m11(), m_matrix->m12(), m_matrix->m13(), m_matrix->m14(),
113 m_matrix->m21(), m_matrix->m22(), m_matrix->m23(), m_matrix->m24(), 138 m_matrix->m21(), m_matrix->m22(), m_matrix->m23(), m_matrix->m24(),
114 m_matrix->m31(), m_matrix->m32(), m_matrix->m33(), m_matrix->m34(), 139 m_matrix->m31(), m_matrix->m32(), m_matrix->m33(), m_matrix->m34(),
115 m_matrix->m41(), m_matrix->m42(), m_matrix->m43(), m_matrix->m44() 140 m_matrix->m41(), m_matrix->m42(), m_matrix->m43(), m_matrix->m44()
116 }; 141 };
117 142
118 return DOMFloat64Array::create(array, 16); 143 return DOMFloat64Array::create(array, 16);
119 } 144 }
120 145
121 } // namespace blink 146 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.h ('k') | third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698