mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-01-26 06:26:17 -05:00
Rect: operator method to offset by a Point.
This commit is contained in:
parent
79330015ed
commit
f722497b01
@ -57,4 +57,9 @@ Rect& Rect::operator+=(const Rect& p) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
Rect& Rect::operator+=(const Point& p) {
|
||||
pos += p;
|
||||
return *this;
|
||||
}
|
||||
|
||||
} /* namespace ui */
|
||||
|
@ -208,6 +208,7 @@ struct Rect {
|
||||
}
|
||||
|
||||
Rect& operator+=(const Rect& p);
|
||||
Rect& operator+=(const Point& p);
|
||||
|
||||
operator bool() const {
|
||||
return !size.is_empty();
|
||||
|
Loading…
x
Reference in New Issue
Block a user