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

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: Add a test and fixed comments by vollick@. 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 be5ba4c03ce6c46ecf99f8b4b7515494f2150f26..40733e3f401da1744400413b9a35fb96b263588c 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,11 @@ 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& decomp,
+ const Transform& transform,
+ 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