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

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: Created 7 years, 2 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') | no next file with comments »
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 07bf0d5703ebb6e0768e0510566201a052bd27a2..a77ded28f73c5021d75f97fd92708dc69d550ca4 100644
--- a/ui/gfx/transform_util.h
+++ b/ui/gfx/transform_util.h
@@ -11,6 +11,7 @@
namespace gfx {
class Point;
+class Rect;
// Returns a scale transform at |anchor| point.
GFX_EXPORT Transform GetScaleTransform(const Point& anchor, float scale);
@@ -53,6 +54,10 @@ GFX_EXPORT bool DecomposeTransform(DecomposedTransform* out,
// http://www.w3.org/TR/css3-3d-transforms/.
GFX_EXPORT Transform ComposeTransform(const DecomposedTransform& decomp);
+GFX_EXPORT bool SnapTransform(Transform* out,
+ const Transform& transform,
+ const Rect& viewport);
+
} // namespace gfx
#endif // UI_GFX_TRANSFORM_UTIL_H_
« no previous file with comments | « no previous file | ui/gfx/transform_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698