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

Unified Diff: ui/gfx/rect.h

Issue 10704198: Scale to DIPs in ppb_graphics2d_impl for proper invalidation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make generic ScaleBounds method, handle scroll properly Created 8 years, 5 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/rect.cc » ('j') | webkit/plugins/ppapi/ppb_graphics_2d_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/rect.h
diff --git a/ui/gfx/rect.h b/ui/gfx/rect.h
index 62a1ba3a7a3e7d9fbbb4383fb7480b0c75cf4297..398ff5f3e034111a6c9387d6855e9a23d51916e5 100644
--- a/ui/gfx/rect.h
+++ b/ui/gfx/rect.h
@@ -45,6 +45,11 @@ class UI_EXPORT Rect : public RectBase<Rect, Point, Size, Insets, int> {
~Rect();
+ // Apply scale to a rectangle, taking care in to round coordinates outward so
+ // a rectangle scaled down then scaled back up by the inverse scale would
+ // fully contain the original.
+ void ScaleBounds(float scale);
sky 2012/07/17 22:12:12 rect_base already has Scale(float). Is there a rea
Josh Horwich 2012/07/17 22:53:36 Yes, that method scales the origin and size indepe
+
#if defined(OS_WIN)
Rect& operator=(const RECT& r);
#elif defined(OS_MACOSX)
« no previous file with comments | « no previous file | ui/gfx/rect.cc » ('j') | webkit/plugins/ppapi/ppb_graphics_2d_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698