mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-25 23:30:40 -04:00
Hide ui::Rect implementation.
This commit is contained in:
parent
d15ace4676
commit
e820bed097
12 changed files with 52 additions and 42 deletions
|
@ -51,21 +51,21 @@ Rect& Rect::operator+=(const Rect& p) {
|
|||
if( !p.is_empty() ) {
|
||||
const auto x1 = std::min(left(), p.left());
|
||||
const auto y1 = std::min(top(), p.top());
|
||||
pos = { x1, y1 };
|
||||
_pos = { x1, y1 };
|
||||
const auto x2 = std::max(right(), p.right());
|
||||
const auto y2 = std::max(bottom(), p.bottom());
|
||||
size = { x2 - x1, y2 - y1 };
|
||||
_size = { x2 - x1, y2 - y1 };
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
Rect& Rect::operator+=(const Point& p) {
|
||||
pos += p;
|
||||
_pos += p;
|
||||
return *this;
|
||||
}
|
||||
|
||||
Rect& Rect::operator-=(const Point& p) {
|
||||
pos -= p;
|
||||
_pos -= p;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue