Added rect_contains()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15298 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
eba7781c71
commit
a410e190a4
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user