gdi32: Move a couple of rectangle helper functions to the header.
This commit is contained in:
parent
103719e9e9
commit
ba168763b2
|
@ -47,23 +47,6 @@ static inline void swap_ints( int *i, int *j )
|
||||||
*j = tmp;
|
*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,
|
static void get_vis_rectangles( DC *dc_dst, struct bitblt_coords *dst,
|
||||||
DC *dc_src, struct bitblt_coords *src )
|
DC *dc_src, struct bitblt_coords *src )
|
||||||
{
|
{
|
||||||
|
|
|
@ -72,14 +72,6 @@
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(bitmap);
|
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
|
Some of the following helper functions are duplicated in
|
||||||
dlls/x11drv/dib.c
|
dlls/x11drv/dib.c
|
||||||
|
|
|
@ -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);
|
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 */
|
#endif /* __WINE_GDI_PRIVATE_H */
|
||||||
|
|
Loading…
Reference in New Issue