Hide ui::Point implementation.

This commit is contained in:
Jared Boone 2016-11-28 10:39:10 -08:00
parent 606c1cebac
commit aac2d31548
11 changed files with 78 additions and 57 deletions

View file

@ -26,8 +26,8 @@
namespace ui {
bool Rect::contains(const Point p) const {
return (p.x >= left()) && (p.y >= top()) &&
(p.x < right()) && (p.y < bottom());
return (p.x() >= left()) && (p.y() >= top()) &&
(p.x() < right()) && (p.y() < bottom());
}
Rect Rect::intersect(const Rect& o) const {
@ -64,4 +64,9 @@ Rect& Rect::operator+=(const Point& p) {
return *this;
}
Rect& Rect::operator-=(const Point& p) {
pos -= p;
return *this;
}
} /* namespace ui */