OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005, 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006 Apple Computer, Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 setMatrix(a, b, c, d, e, f); | 77 setMatrix(a, b, c, d, e, f); |
78 } | 78 } |
79 TransformationMatrix(double m11, double m12, double m13, double m14, | 79 TransformationMatrix(double m11, double m12, double m13, double m14, |
80 double m21, double m22, double m23, double m24, | 80 double m21, double m22, double m23, double m24, |
81 double m31, double m32, double m33, double m34, | 81 double m31, double m32, double m33, double m34, |
82 double m41, double m42, double m43, double m44) | 82 double m41, double m42, double m43, double m44) |
83 { | 83 { |
84 checkAlignment(); | 84 checkAlignment(); |
85 setMatrix(m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m4
1, m42, m43, m44); | 85 setMatrix(m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m4
1, m42, m43, m44); |
86 } | 86 } |
| 87 TransformationMatrix(const SkMatrix44& matrix) |
| 88 { |
| 89 setMatrix( |
| 90 matrix.get(0, 0), matrix.get(1, 0), matrix.get(2, 0), matrix.get(3,
0), |
| 91 matrix.get(0, 1), matrix.get(1, 1), matrix.get(2, 1), matrix.get(3,
1), |
| 92 matrix.get(0, 2), matrix.get(1, 2), matrix.get(2, 2), matrix.get(3,
2), |
| 93 matrix.get(0, 3), matrix.get(1, 3), matrix.get(2, 3), matrix.get(3,
3)); |
| 94 } |
87 | 95 |
88 void setMatrix(double a, double b, double c, double d, double e, double f) | 96 void setMatrix(double a, double b, double c, double d, double e, double f) |
89 { | 97 { |
90 m_matrix[0][0] = a; | 98 m_matrix[0][0] = a; |
91 m_matrix[0][1] = b; | 99 m_matrix[0][1] = b; |
92 m_matrix[0][2] = 0; | 100 m_matrix[0][2] = 0; |
93 m_matrix[0][3] = 0; | 101 m_matrix[0][3] = 0; |
94 m_matrix[1][0] = c; | 102 m_matrix[1][0] = c; |
95 m_matrix[1][1] = d; | 103 m_matrix[1][1] = d; |
96 m_matrix[1][2] = 0; | 104 m_matrix[1][2] = 0; |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 Matrix4 m_matrix; | 406 Matrix4 m_matrix; |
399 }; | 407 }; |
400 | 408 |
401 // Redeclared here to avoid ODR issues. | 409 // Redeclared here to avoid ODR issues. |
402 // See platform/testing/TransformPrinters.h. | 410 // See platform/testing/TransformPrinters.h. |
403 void PrintTo(const TransformationMatrix&, std::ostream*); | 411 void PrintTo(const TransformationMatrix&, std::ostream*); |
404 | 412 |
405 } // namespace blink | 413 } // namespace blink |
406 | 414 |
407 #endif // TransformationMatrix_h | 415 #endif // TransformationMatrix_h |
OLD | NEW |