gdi32: Move a couple of rectangle helper functions to the header.

This commit is contained in:
Alexandre Julliard 2011-07-18 16:50:25 +02:00
parent 103719e9e9
commit ba168763b2
3 changed files with 17 additions and 25 deletions

View File

@ -47,23 +47,6 @@ static inline void swap_ints( int *i, int *j )
*j = tmp;
}
static inline BOOL intersect_rect( RECT *dst, const RECT *src1, const RECT *src2 )
{
dst->left = max( src1->left, src2->left );
dst->top = max( src1->top, src2->top );
dst->right = min( src1->right, src2->right );
dst->bottom = min( src1->bottom, src2->bottom );
return (dst->left < dst->right && dst->top < dst->bottom);
}
static inline void offset_rect( RECT *rect, int offset_x, int offset_y )
{
rect->left += offset_x;
rect->top += offset_y;
rect->right += offset_x;
rect->bottom += offset_y;
}
static void get_vis_rectangles( DC *dc_dst, struct bitblt_coords *dst,
DC *dc_src, struct bitblt_coords *src )
{

View File

@ -72,14 +72,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(bitmap);
static inline void offset_rect( RECT *rect, int offset_x, int offset_y )
{
rect->left += offset_x;
rect->top += offset_y;
rect->right += offset_x;
rect->bottom += offset_y;
}
/*
Some of the following helper functions are duplicated in
dlls/x11drv/dib.c

View File

@ -526,4 +526,21 @@ BOOL WINAPI FontIsLinked(HDC);
BOOL WINAPI SetVirtualResolution(HDC hdc, DWORD horz_res, DWORD vert_res, DWORD horz_size, DWORD vert_size);
static inline BOOL intersect_rect( RECT *dst, const RECT *src1, const RECT *src2 )
{
dst->left = max( src1->left, src2->left );
dst->top = max( src1->top, src2->top );
dst->right = min( src1->right, src2->right );
dst->bottom = min( src1->bottom, src2->bottom );
return (dst->left < dst->right && dst->top < dst->bottom);
}
static inline void offset_rect( RECT *rect, int offset_x, int offset_y )
{
rect->left += offset_x;
rect->top += offset_y;
rect->right += offset_x;
rect->bottom += offset_y;
}
#endif /* __WINE_GDI_PRIVATE_H */