added offsect_rect, fixed a spelling error
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4362 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -94,7 +94,7 @@ valid_rect(clipping_rect rect)
|
|||||||
|
|
||||||
|
|
||||||
static inline bool
|
static inline bool
|
||||||
rects_intersects(clipping_rect rectA, clipping_rect rectB)
|
rects_intersect(clipping_rect rectA, clipping_rect rectB)
|
||||||
{
|
{
|
||||||
return valid_rect(sect_rect(rectA, rectB));
|
return valid_rect(sect_rect(rectA, rectB));
|
||||||
}
|
}
|
||||||
@@ -114,4 +114,17 @@ rect_height(clipping_rect rect)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static inline clipping_rect
|
||||||
|
rect_offset(clipping_rect rect, int32 x, int32 y)
|
||||||
|
{
|
||||||
|
clipping_rect offRect;
|
||||||
|
|
||||||
|
offRect.left = rect.left + x;
|
||||||
|
offRect.top = rect.top + y;
|
||||||
|
offRect.right = rect.right + x;
|
||||||
|
offRect.bottom = rect.bottom + y;
|
||||||
|
|
||||||
|
return offRect;
|
||||||
|
}
|
||||||
|
|
||||||
#endif // __CLIPPING_H
|
#endif // __CLIPPING_H
|
||||||
|
|||||||
Reference in New Issue
Block a user