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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 setMatrix(a, b, c, d, e, f); | 99 setMatrix(a, b, c, d, e, f); |
100 } | 100 } |
101 TransformationMatrix(double m11, double m12, double m13, double m14, | 101 TransformationMatrix(double m11, double m12, double m13, double m14, |
102 double m21, double m22, double m23, double m24, | 102 double m21, double m22, double m23, double m24, |
103 double m31, double m32, double m33, double m34, | 103 double m31, double m32, double m33, double m34, |
104 double m41, double m42, double m43, double m44) | 104 double m41, double m42, double m43, double m44) |
105 { | 105 { |
106 checkAlignment(); | 106 checkAlignment(); |
107 setMatrix(m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m4
1, m42, m43, m44); | 107 setMatrix(m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m4
1, m42, m43, m44); |
108 } | 108 } |
| 109 TransformationMatrix(const SkMatrix44& matrix) |
| 110 { |
| 111 setMatrix( |
| 112 matrix.get(0, 0), matrix.get(1, 0), matrix.get(2, 0), matrix.get(3,
0), |
| 113 matrix.get(0, 1), matrix.get(1, 1), matrix.get(2, 1), matrix.get(3,
1), |
| 114 matrix.get(0, 2), matrix.get(1, 2), matrix.get(2, 2), matrix.get(3,
2), |
| 115 matrix.get(0, 3), matrix.get(1, 3), matrix.get(2, 3), matrix.get(3,
3)); |
| 116 } |
109 | 117 |
110 void setMatrix(double a, double b, double c, double d, double e, double f) | 118 void setMatrix(double a, double b, double c, double d, double e, double f) |
111 { | 119 { |
112 m_matrix[0][0] = a; | 120 m_matrix[0][0] = a; |
113 m_matrix[0][1] = b; | 121 m_matrix[0][1] = b; |
114 m_matrix[0][2] = 0; | 122 m_matrix[0][2] = 0; |
115 m_matrix[0][3] = 0; | 123 m_matrix[0][3] = 0; |
116 m_matrix[1][0] = c; | 124 m_matrix[1][0] = c; |
117 m_matrix[1][1] = d; | 125 m_matrix[1][1] = d; |
118 m_matrix[1][2] = 0; | 126 m_matrix[1][2] = 0; |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 Matrix4 m_matrix; | 433 Matrix4 m_matrix; |
426 }; | 434 }; |
427 | 435 |
428 // Redeclared here to avoid ODR issues. | 436 // Redeclared here to avoid ODR issues. |
429 // See platform/testing/TransformPrinters.h. | 437 // See platform/testing/TransformPrinters.h. |
430 void PrintTo(const TransformationMatrix&, std::ostream*); | 438 void PrintTo(const TransformationMatrix&, std::ostream*); |
431 | 439 |
432 } // namespace blink | 440 } // namespace blink |
433 | 441 |
434 #endif // TransformationMatrix_h | 442 #endif // TransformationMatrix_h |
OLD | NEW |