From cd72ae9e6538586d312482d52cfd2517564236a9 Mon Sep 17 00:00:00 2001 From: Andrew Kurushin Date: Sat, 28 May 2005 12:28:23 +0000 Subject: commit adds setWidth & setHeight to extend bounds of rect svn-id: r18283 --- common/rect.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'common') 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 -- cgit v1.2.3