Added rect_contains()

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15298 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2005-12-03 14:12:10 +00:00
parent eba7781c71
commit a410e190a4

View File

@ -126,6 +126,14 @@ point_in(const clipping_rect &rect, const BPoint &pt)
}
static inline bool
rect_contains(const clipping_rect &rect, const clipping_rect &testRect)
{
return rect.top <= testRect.top && rect.bottom >= testRect.bottom
&& rect.left <= testRect.left && rect.right >= testRect.right;
}
// Checks if the rect is valid
static inline bool
valid_rect(const clipping_rect &rect)