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

Unified Diff: gfx/rect.h

Issue 6254004: Move more web widgets painting from webkit to chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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
Index: gfx/rect.h
diff --git a/gfx/rect.h b/gfx/rect.h
index e305b9bdb8ff6d6bb565d3e2a2ac58b55ec09e42..b4c9a0bd397ab44d1d7fcc1e47f6d9dc5588f889 100644
--- a/gfx/rect.h
+++ b/gfx/rect.h
@@ -164,6 +164,10 @@ class Rect {
// Returns the center of this rectangle.
Point CenterPoint() const;
+ // Return a rectangle that has the same center point but with a size capped
+ // at given |size|.
+ Rect Center(const gfx::Size& size) const;
+
// Returns true if this rectangle shares an entire edge (i.e., same width or
// same height) with the given rectangle, and the rectangles do not overlap.
bool SharesEdgeWith(const gfx::Rect& rect) const;

Powered by Google App Engine
This is Rietveld 408576698