Added an "equals" function to Common::Rect (used by SCI)

svn-id: r38428
This commit is contained in:
Filippos Karapetis 2009-02-17 17:44:04 +00:00
parent 57176cdce1
commit 5b8d0a77ff

View File

@ -137,6 +137,17 @@ struct Rect {
return (left < r.left) && (right > r.right) && (top < r.top) && (bottom > r.bottom);
}
/**
* Check if the given rect is equal to this one.
*
* @param r The rectangle to check
*
* @return true if the given rect is equal, false otherwise
*/
bool equals(const Rect &r) const {
return (left == r.left) && (right == r.right) && (top == r.top) && (bottom == r.bottom);
}
/**
* Check if given rectangle intersects with this rectangle
*