diff options
author | Andrew Kurushin | 2005-05-28 12:28:23 +0000 |
---|---|---|
committer | Andrew Kurushin | 2005-05-28 12:28:23 +0000 |
commit | cd72ae9e6538586d312482d52cfd2517564236a9 (patch) | |
tree | d8594cf3142bf0883d7fcd4c3dfc2d3393b23ca4 /common | |
parent | 3d1c9693777cc5d75016b2442d7f13297cbba9a5 (diff) | |
download | scummvm-rg350-cd72ae9e6538586d312482d52cfd2517564236a9.tar.gz scummvm-rg350-cd72ae9e6538586d312482d52cfd2517564236a9.tar.bz2 scummvm-rg350-cd72ae9e6538586d312482d52cfd2517564236a9.zip |
commit adds setWidth & setHeight to extend bounds of rect
svn-id: r18283
Diffstat (limited to 'common')
-rw-r--r-- | common/rect.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/common/rect.h b/common/rect.h index 66c7be738f..7c6edfc60a 100644 --- a/common/rect.h +++ b/common/rect.h @@ -72,6 +72,14 @@ struct Rect { } int16 width() const { return right - left; } int16 height() const { return bottom - top; } + + void setWidth(int16 width) { + right = left + width; + } + + void setHeight(int16 height) { + bottom = top + height; + } /*! @brief check if given position is inside this rectangle |