commit adds setWidth & setHeight to extend bounds of rect
svn-id: r18283
This commit is contained in:
parent
3d1c969377
commit
cd72ae9e65
1 changed files with 8 additions and 0 deletions
|
@ -72,6 +72,14 @@ struct Rect {
|
||||||
}
|
}
|
||||||
int16 width() const { return right - left; }
|
int16 width() const { return right - left; }
|
||||||
int16 height() const { return bottom - top; }
|
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
|
/*! @brief check if given position is inside this rectangle
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue