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

Unified Diff: ui/gfx/transform_util.h

Issue 23444049: Implement transform snapping for gfx::Transforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test case to back-map correctly. Address danajk@ comments. Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/gfx/transform_util.cc » ('j') | ui/gfx/transform_util.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/transform_util.h
diff --git a/ui/gfx/transform_util.h b/ui/gfx/transform_util.h
index b6da7b0782d3b63d461fa685912bff11b0c8cfda..7e43a0ed2b0eedcd1f144e935d3e35745f31bcaa 100644
--- a/ui/gfx/transform_util.h
+++ b/ui/gfx/transform_util.h
@@ -11,6 +11,7 @@
namespace gfx {
class Point;
+class RectF;
// Returns a scale transform at |anchor| point.
UI_EXPORT Transform GetScaleTransform(const Point& anchor, float scale);
@@ -51,6 +52,10 @@ UI_EXPORT bool DecomposeTransform(DecomposedTransform* out,
// http://www.w3.org/TR/css3-3d-transforms/.
UI_EXPORT Transform ComposeTransform(const DecomposedTransform& decomp);
+UI_EXPORT bool SnapRotation(DecomposedTransform* out,
+ const DecomposedTransform& in,
+ const RectF& viewport);
+
} // namespace gfx
#endif // UI_GFX_TRANSFORM_UTIL_H_
« no previous file with comments | « no previous file | ui/gfx/transform_util.cc » ('j') | ui/gfx/transform_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698