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 DOMMatrixReadOnly::~DOMMatrixReadOnly() | 9 DOMMatrixReadOnly::~DOMMatrixReadOnly() |
10 { | 10 { |
(...skipping 28 matching lines...) Expand all Loading... |
39 { | 39 { |
40 return DOMMatrix::create(this)->scale3dSelf(scale, ox, oy, oz); | 40 return DOMMatrix::create(this)->scale3dSelf(scale, ox, oy, oz); |
41 } | 41 } |
42 | 42 |
43 DOMMatrix* DOMMatrixReadOnly::scaleNonUniform(double sx, double sy, double sz, | 43 DOMMatrix* DOMMatrixReadOnly::scaleNonUniform(double sx, double sy, double sz, |
44 double ox, double oy, double oz) | 44 double ox, double oy, double oz) |
45 { | 45 { |
46 return DOMMatrix::create(this)->scaleNonUniformSelf(sx, sy, sz, ox, oy, oz); | 46 return DOMMatrix::create(this)->scaleNonUniformSelf(sx, sy, sz, ox, oy, oz); |
47 } | 47 } |
48 | 48 |
49 DOMFloat32Array* DOMMatrixReadOnly::toFloat32Array() const | 49 PassRefPtr<DOMFloat32Array> DOMMatrixReadOnly::toFloat32Array() const |
50 { | 50 { |
51 float array[] = { | 51 float array[] = { |
52 static_cast<float>(m_matrix->m11()), static_cast<float>(m_matrix->m12())
, static_cast<float>(m_matrix->m13()), static_cast<float>(m_matrix->m14()), | 52 static_cast<float>(m_matrix->m11()), static_cast<float>(m_matrix->m12())
, static_cast<float>(m_matrix->m13()), static_cast<float>(m_matrix->m14()), |
53 static_cast<float>(m_matrix->m21()), static_cast<float>(m_matrix->m22())
, static_cast<float>(m_matrix->m23()), static_cast<float>(m_matrix->m24()), | 53 static_cast<float>(m_matrix->m21()), static_cast<float>(m_matrix->m22())
, static_cast<float>(m_matrix->m23()), static_cast<float>(m_matrix->m24()), |
54 static_cast<float>(m_matrix->m31()), static_cast<float>(m_matrix->m32())
, static_cast<float>(m_matrix->m33()), static_cast<float>(m_matrix->m34()), | 54 static_cast<float>(m_matrix->m31()), static_cast<float>(m_matrix->m32())
, static_cast<float>(m_matrix->m33()), static_cast<float>(m_matrix->m34()), |
55 static_cast<float>(m_matrix->m41()), static_cast<float>(m_matrix->m42())
, static_cast<float>(m_matrix->m43()), static_cast<float>(m_matrix->m44()) | 55 static_cast<float>(m_matrix->m41()), static_cast<float>(m_matrix->m42())
, static_cast<float>(m_matrix->m43()), static_cast<float>(m_matrix->m44()) |
56 }; | 56 }; |
57 | 57 |
58 return DOMFloat32Array::create(array, 16); | 58 return DOMFloat32Array::create(array, 16); |
59 } | 59 } |
60 | 60 |
61 DOMFloat64Array* DOMMatrixReadOnly::toFloat64Array() const | 61 PassRefPtr<DOMFloat64Array> DOMMatrixReadOnly::toFloat64Array() const |
62 { | 62 { |
63 double array[] = { | 63 double array[] = { |
64 m_matrix->m11(), m_matrix->m12(), m_matrix->m13(), m_matrix->m14(), | 64 m_matrix->m11(), m_matrix->m12(), m_matrix->m13(), m_matrix->m14(), |
65 m_matrix->m21(), m_matrix->m22(), m_matrix->m23(), m_matrix->m24(), | 65 m_matrix->m21(), m_matrix->m22(), m_matrix->m23(), m_matrix->m24(), |
66 m_matrix->m31(), m_matrix->m32(), m_matrix->m33(), m_matrix->m34(), | 66 m_matrix->m31(), m_matrix->m32(), m_matrix->m33(), m_matrix->m34(), |
67 m_matrix->m41(), m_matrix->m42(), m_matrix->m43(), m_matrix->m44() | 67 m_matrix->m41(), m_matrix->m42(), m_matrix->m43(), m_matrix->m44() |
68 }; | 68 }; |
69 | 69 |
70 return DOMFloat64Array::create(array, 16); | 70 return DOMFloat64Array::create(array, 16); |
71 } | 71 } |
72 | 72 |
73 } // namespace blink | 73 } // namespace blink |
OLD | NEW |