OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef UI_GFX_TRANSFORM_H_ | 5 #ifndef UI_GFX_TRANSFORM_H_ |
6 #define UI_GFX_TRANSFORM_H_ | 6 #define UI_GFX_TRANSFORM_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 return gfx::Vector2dF(matrix_.get(0, 0), matrix_.get(1, 1)); | 94 return gfx::Vector2dF(matrix_.get(0, 0), matrix_.get(1, 1)); |
95 } | 95 } |
96 | 96 |
97 // Applies the current transformation on a translation and assigns the result | 97 // Applies the current transformation on a translation and assigns the result |
98 // to |this|. | 98 // to |this|. |
99 void Translate(SkMScalar x, SkMScalar y); | 99 void Translate(SkMScalar x, SkMScalar y); |
100 void Translate3d(SkMScalar x, SkMScalar y, SkMScalar z); | 100 void Translate3d(SkMScalar x, SkMScalar y, SkMScalar z); |
101 | 101 |
102 // Applies the current transformation on a skew and assigns the result | 102 // Applies the current transformation on a skew and assigns the result |
103 // to |this|. | 103 // to |this|. |
104 void SkewX(double angle_x); | 104 void Skew(double angle_x, double angle_y); |
105 void SkewY(double angle_y); | |
106 | 105 |
107 // Applies the current transformation on a perspective transform and assigns | 106 // Applies the current transformation on a perspective transform and assigns |
108 // the result to |this|. | 107 // the result to |this|. |
109 void ApplyPerspectiveDepth(SkMScalar depth); | 108 void ApplyPerspectiveDepth(SkMScalar depth); |
110 | 109 |
111 // Applies a transformation on the current transformation | 110 // Applies a transformation on the current transformation |
112 // (i.e. 'this = this * transform;'). | 111 // (i.e. 'this = this * transform;'). |
113 void PreconcatTransform(const Transform& transform); | 112 void PreconcatTransform(const Transform& transform); |
114 | 113 |
115 // Applies a transformation on the current transformation | 114 // Applies a transformation on the current transformation |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 }; | 270 }; |
272 | 271 |
273 // This is declared here for use in gtest-based unit tests but is defined in | 272 // This is declared here for use in gtest-based unit tests but is defined in |
274 // the gfx_test_support target. Depend on that to use this in your unit test. | 273 // the gfx_test_support target. Depend on that to use this in your unit test. |
275 // This should not be used in production code - call ToString() instead. | 274 // This should not be used in production code - call ToString() instead. |
276 void PrintTo(const Transform& transform, ::std::ostream* os); | 275 void PrintTo(const Transform& transform, ::std::ostream* os); |
277 | 276 |
278 } // namespace gfx | 277 } // namespace gfx |
279 | 278 |
280 #endif // UI_GFX_TRANSFORM_H_ | 279 #endif // UI_GFX_TRANSFORM_H_ |
OLD | NEW |