Chromium Code Reviews| Index: ui/gfx/rect_base.h |
| diff --git a/ui/gfx/rect_base.h b/ui/gfx/rect_base.h |
| index 3ad12c8b245b2cccc0e81706af8f4123083009d0..9c057a107fa3adb338c01bace62eddd5ee6e1a3d 100644 |
| --- a/ui/gfx/rect_base.h |
| +++ b/ui/gfx/rect_base.h |
| @@ -47,6 +47,11 @@ class UI_EXPORT RectBase { |
| Type right() const { return x() + width(); } |
| Type bottom() const { return y() + height(); } |
| + PointClass TopLeft() const { return PointClass(x(), y()); } |
|
sky
2012/11/14 22:23:43
This is the same as origin(), do we really need it
danakj
2012/11/14 22:36:34
It's true, we don't. I liked having consistency so
|
| + PointClass TopRight() const { return PointClass(right(), y()); } |
|
sky
2012/11/14 22:23:43
Can these be named unix_hacker style?
danakj
2012/11/14 22:36:34
Done.
|
| + PointClass BottomLeft() const { return PointClass(x(), bottom()); } |
| + PointClass BottomRight() const { return PointClass(right(), bottom()); } |
| + |
| VectorClass OffsetFromOrigin() const { |
| return VectorClass(x(), y()); |
| } |