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 #include "core/dom/DOMMatrix.h" | 5 #include "core/dom/DOMMatrix.h" |
6 | 6 |
7 namespace blink { | 7 namespace blink { |
8 | 8 |
9 DOMMatrix* DOMMatrix::create() | 9 DOMMatrix* DOMMatrix::create() |
10 { | 10 { |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
111 m_matrix->skewX(sx); | 111 m_matrix->skewX(sx); |
112 return this; | 112 return this; |
113 } | 113 } |
114 | 114 |
115 DOMMatrix* DOMMatrix::skewYSelf(double sy) | 115 DOMMatrix* DOMMatrix::skewYSelf(double sy) |
116 { | 116 { |
117 m_matrix->skewY(sy); | 117 m_matrix->skewY(sy); |
118 return this; | 118 return this; |
119 } | 119 } |
120 | 120 |
121 DOMMatrix* DOMMatrix::invertSelf() | |
122 { | |
123 if (m_matrix->isInvertible()) { | |
124 m_matrix = TransformationMatrix::create(m_matrix->inverse()); | |
125 } else { | |
126 setM11(std::nan("")); | |
dominicc (has gone to gerrit)
2016/08/30 02:22:09
Hmm, I haven't done any numerical programming with
Hwanseung Lee
2016/08/30 12:47:05
Done.
| |
127 setM12(std::nan("")); | |
128 setM13(std::nan("")); | |
129 setM14(std::nan("")); | |
130 setM21(std::nan("")); | |
131 setM22(std::nan("")); | |
132 setM23(std::nan("")); | |
133 setM24(std::nan("")); | |
134 setM31(std::nan("")); | |
135 setM32(std::nan("")); | |
136 setM33(std::nan("")); | |
137 setM34(std::nan("")); | |
138 setM41(std::nan("")); | |
139 setM42(std::nan("")); | |
140 setM43(std::nan("")); | |
141 setM44(std::nan("")); | |
142 setIs2D(false); | |
143 } | |
144 return this; | |
145 } | |
146 | |
121 } // namespace blink | 147 } // namespace blink |
OLD | NEW |