| 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_UTIL_H_ | 5 #ifndef UI_GFX_TRANSFORM_UTIL_H_ |
| 6 #define UI_GFX_TRANSFORM_UTIL_H_ | 6 #define UI_GFX_TRANSFORM_UTIL_H_ |
| 7 | 7 |
| 8 #include "ui/gfx/geometry/point.h" |
| 8 #include "ui/gfx/gfx_export.h" | 9 #include "ui/gfx/gfx_export.h" |
| 9 #include "ui/gfx/point.h" | |
| 10 #include "ui/gfx/transform.h" | 10 #include "ui/gfx/transform.h" |
| 11 | 11 |
| 12 namespace gfx { | 12 namespace gfx { |
| 13 | 13 |
| 14 class Point; | 14 class Point; |
| 15 class Rect; | 15 class Rect; |
| 16 | 16 |
| 17 // Returns a scale transform at |anchor| point. | 17 // Returns a scale transform at |anchor| point. |
| 18 GFX_EXPORT Transform GetScaleTransform(const Point& anchor, float scale); | 18 GFX_EXPORT Transform GetScaleTransform(const Point& anchor, float scale); |
| 19 | 19 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 // Calculates a transform with a transformed origin. The resulting tranform is | 62 // Calculates a transform with a transformed origin. The resulting tranform is |
| 63 // created by composing P * T * P^-1 where P is a constant transform to the new | 63 // created by composing P * T * P^-1 where P is a constant transform to the new |
| 64 // origin. | 64 // origin. |
| 65 GFX_EXPORT Transform TransformAboutPivot(const gfx::Point& pivot, | 65 GFX_EXPORT Transform TransformAboutPivot(const gfx::Point& pivot, |
| 66 const gfx::Transform& transform); | 66 const gfx::Transform& transform); |
| 67 | 67 |
| 68 } // namespace gfx | 68 } // namespace gfx |
| 69 | 69 |
| 70 #endif // UI_GFX_TRANSFORM_UTIL_H_ | 70 #endif // UI_GFX_TRANSFORM_UTIL_H_ |
| OLD | NEW |