Chromium Code Reviews| Index: ui/gfx/geometry/insets.h |
| diff --git a/ui/gfx/geometry/insets.h b/ui/gfx/geometry/insets.h |
| index bc5e3460ca3bdff536c43c01226566aa11bde4e3..5386a971fdd9bad1902dc3a703e6779f8197a93c 100644 |
| --- a/ui/gfx/geometry/insets.h |
| +++ b/ui/gfx/geometry/insets.h |
| @@ -12,6 +12,8 @@ |
| namespace gfx { |
| +class Vector2d; |
| + |
| // Represents the widths of the four borders or margins of an unspecified |
| // rectangle. An Insets stores the thickness of the top, left, bottom and right |
| // edges, without storing the actual size and position of the rectangle itself. |
| @@ -93,6 +95,8 @@ class GFX_EXPORT Insets { |
| static_cast<int>(right() * x_scale)); |
| } |
| + Insets Offset(const gfx::Vector2d& vector) const; |
|
danakj
2016/10/29 00:45:53
Can you leave a comment explaining in more detail
Evan Stade
2016/11/01 16:26:23
Done.
|
| + |
| operator InsetsF() const { |
| return InsetsF(static_cast<float>(top()), static_cast<float>(left()), |
| static_cast<float>(bottom()), static_cast<float>(right())); |