mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2026-09-10 00:29:33 +00:00
Rect: operator method to offset by a Point.
This commit is contained in:
@@ -57,4 +57,9 @@ Rect& Rect::operator+=(const Rect& p) {
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Rect& Rect::operator+=(const Point& p) {
|
||||||
|
pos += p;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
} /* namespace ui */
|
} /* namespace ui */
|
||||||
|
|||||||
@@ -208,6 +208,7 @@ struct Rect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Rect& operator+=(const Rect& p);
|
Rect& operator+=(const Rect& p);
|
||||||
|
Rect& operator+=(const Point& p);
|
||||||
|
|
||||||
operator bool() const {
|
operator bool() const {
|
||||||
return !size.is_empty();
|
return !size.is_empty();
|
||||||
|
|||||||
Reference in New Issue
Block a user