add method to grow a rect
svn-id: r7544
This commit is contained in:
parent
8b419944ee
commit
b34318ca55
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue