diff options
author | Max Horn | 2003-05-15 22:15:24 +0000 |
---|---|---|
committer | Max Horn | 2003-05-15 22:15:24 +0000 |
commit | b34318ca5577aee75f0c86a783a11a45de4886e5 (patch) | |
tree | 8e8cf157d88a349c2dc0eb85f70eb3e89e03cdef /common | |
parent | 8b419944eee013fe45909b15e0375531383dd25b (diff) | |
download | scummvm-rg350-b34318ca5577aee75f0c86a783a11a45de4886e5.tar.gz scummvm-rg350-b34318ca5577aee75f0c86a783a11a45de4886e5.tar.bz2 scummvm-rg350-b34318ca5577aee75f0c86a783a11a45de4886e5.zip |
add method to grow a rect
svn-id: r7544
Diffstat (limited to 'common')
-rw-r--r-- | common/rect.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/common/rect.h b/common/rect.h index 408fc0ccfe..ca4b7f0c3e 100644 --- a/common/rect.h +++ b/common/rect.h @@ -87,6 +87,13 @@ struct Rect { bool contains(const Rect & r) const { return (left <= r.right) && (r.left < right) && (top <= r.bottom) && (r.top < bottom); } + + void grow(int16 offset) { + top -= offset; + left -= offset; + bottom += offset; + right += offset; + } }; }; // End of namespace ScummVM |