walk changes, nothing special

This commit is contained in:
Henrique
2011-11-06 02:12:13 -02:00
parent 4208e40c76
commit 7db6b8b5e6
3 changed files with 19 additions and 26 deletions

View File

@@ -251,6 +251,20 @@ public:
return tmp;
}
void bound(const TRect<T> &r) {
if(isNull() || r.isNull())
return;
if(left() < r.left())
moveLeft(r.left());
if(top() < r.top())
moveTop(r.top());
if(bottom() > r.bottom())
moveBottom(r.bottom());
if(right() > r.right())
moveRight(r.right());
}
TRect<T>& operator=(const TRect<T>& other) { x1 = other.x1; y1 = other.y1; x2 = other.x2; y2 = other.y2; return *this; }
bool operator==(const TRect<T>& other) const { return (x1 == other.x1 && y1 == other.y1 && x2 == other.x2 && y2 == other.y2); }
bool operator!=(const TRect<T>& other) const { return (x1 != other.x1 || y1 != other.y1 || x2 != other.x2 || y2 != other.y2); }