diff options
-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 |