diff options
Diffstat (limited to 'gfx/rect.cc')
-rw-r--r-- | gfx/rect.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gfx/rect.cc b/gfx/rect.cc index dd8f392..ea328beb 100644 --- a/gfx/rect.cc +++ b/gfx/rect.cc @@ -15,6 +15,7 @@ #include <iostream> #include "base/logging.h" +#include "gfx/insets.h" namespace { @@ -105,6 +106,10 @@ void Rect::SetRect(int x, int y, int width, int height) { set_height(height); } +void Rect::Inset(const gfx::Insets& insets) { + Inset(insets.left(), insets.top(), insets.right(), insets.bottom()); +} + void Rect::Inset(int left, int top, int right, int bottom) { Offset(left, top); set_width(std::max(width() - left - right, 0)); |