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

Unified Diff: ui/gfx/rect_base.h

Issue 11358240: ui: Add methods to Rect classes to get points at each of the rect's corners. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update cc Created 8 years, 1 month 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 | « cc/tiled_layer.cc ('k') | ui/gfx/rect_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/rect_base.h
diff --git a/ui/gfx/rect_base.h b/ui/gfx/rect_base.h
index 3ad12c8b245b2cccc0e81706af8f4123083009d0..1be30400d6e91e9740bafb3d79e7df535bc40d3e 100644
--- a/ui/gfx/rect_base.h
+++ b/ui/gfx/rect_base.h
@@ -47,6 +47,10 @@ class UI_EXPORT RectBase {
Type right() const { return x() + width(); }
Type bottom() const { return y() + height(); }
+ PointClass top_right() const { return PointClass(right(), y()); }
+ PointClass bottom_left() const { return PointClass(x(), bottom()); }
+ PointClass bottom_right() const { return PointClass(right(), bottom()); }
+
VectorClass OffsetFromOrigin() const {
return VectorClass(x(), y());
}
« no previous file with comments | « cc/tiled_layer.cc ('k') | ui/gfx/rect_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698