Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Side by Side Diff: ui/gfx/transform_util.h

Issue 1071803003: Update matrix distance metric to account for snapping. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: grammar Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host_common.cc ('k') | ui/gfx/transform_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common.cc ('k') | ui/gfx/transform_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698