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/geometry/point.h" |
9 #include "ui/gfx/gfx_export.h" | 9 #include "ui/gfx/gfx_export.h" |
10 #include "ui/gfx/transform.h" | 10 #include "ui/gfx/transform.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 GFX_EXPORT bool SnapTransform(Transform* out, | 58 GFX_EXPORT bool SnapTransform(Transform* out, |
59 const Transform& transform, | 59 const Transform& transform, |
60 const Rect& viewport); | 60 const Rect& viewport); |
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 // Computes the Frobenius norm of (a - b). | |
69 GFX_EXPORT float MatrixDistance(const Transform& a, const Transform& b); | |
70 | |
71 } // namespace gfx | 68 } // namespace gfx |
72 | 69 |
73 #endif // UI_GFX_TRANSFORM_UTIL_H_ | 70 #endif // UI_GFX_TRANSFORM_UTIL_H_ |
OLD | NEW |