| Index: ui/gfx/rect_base.h
|
| diff --git a/ui/gfx/rect_base.h b/ui/gfx/rect_base.h
|
| index a9ddda4b43f1e0cfddd41ec16c19fc758fba64fd..0a3298c06b67fbbdb6209ca30c5647fc1bfc280c 100644
|
| --- a/ui/gfx/rect_base.h
|
| +++ b/ui/gfx/rect_base.h
|
| @@ -22,6 +22,7 @@ template<typename Class,
|
| typename PointClass,
|
| typename SizeClass,
|
| typename InsetsClass,
|
| + typename VectorClass,
|
| typename Type>
|
| class UI_EXPORT RectBase {
|
| public:
|
| @@ -46,6 +47,10 @@ class UI_EXPORT RectBase {
|
| Type right() const { return x() + width(); }
|
| Type bottom() const { return y() + height(); }
|
|
|
| + VectorClass OffsetFromOrigin() const {
|
| + return VectorClass(x(), y());
|
| + }
|
| +
|
| void SetRect(Type x, Type y, Type width, Type height);
|
|
|
| // Shrink the rectangle by a horizontal and vertical distance on all sides.
|
| @@ -61,8 +66,8 @@ class UI_EXPORT RectBase {
|
|
|
| // Move the rectangle by a horizontal and vertical distance.
|
| void Offset(Type horizontal, Type vertical);
|
| - void Offset(const PointClass& point) {
|
| - Offset(point.x(), point.y());
|
| + void Offset(const VectorClass& distance) {
|
| + Offset(distance.x(), distance.y());
|
| }
|
|
|
| InsetsClass InsetsFrom(const Class& inner) const {
|
|
|