aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorAndrew Kurushin2005-05-28 12:28:23 +0000
committerAndrew Kurushin2005-05-28 12:28:23 +0000
commitcd72ae9e6538586d312482d52cfd2517564236a9 (patch)
treed8594cf3142bf0883d7fcd4c3dfc2d3393b23ca4 /common
parent3d1c9693777cc5d75016b2442d7f13297cbba9a5 (diff)
downloadscummvm-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.h8
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