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

Alexandre Julliard julliard at winehq.org
Mon Jul 18 12:47:01 CDT 2011


Module: wine
Branch: master
Commit: ba168763b2f3e6d06714e4f60b8ad70bad6f6d9d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ba168763b2f3e6d06714e4f60b8ad70bad6f6d9d

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Jul 18 16:50:25 2011 +0200

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

---

 dlls/gdi32/bitblt.c      |   17 -----------------
 dlls/gdi32/dib.c         |    8 --------
 dlls/gdi32/gdi_private.h |   17 +++++++++++++++++
 3 files changed, 17 insertions(+), 25 deletions(-)

diff --git a/dlls/gdi32/bitblt.c b/dlls/gdi32/bitblt.c
index da22507..8bd404c 100644
--- a/dlls/gdi32/bitblt.c
+++ b/dlls/gdi32/bitblt.c
@@ -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 )
 {
diff --git a/dlls/gdi32/dib.c b/dlls/gdi32/dib.c
index fd9dfa7..1aa867b 100644
--- a/dlls/gdi32/dib.c
+++ b/dlls/gdi32/dib.c
@@ -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
diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h
index 8c3e9ac..10bfc20 100644
--- a/dlls/gdi32/gdi_private.h
+++ b/dlls/gdi32/gdi_private.h
@@ -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 */




More information about the wine-cvs mailing list