Huw Davies : gdi32: Fix {Bit,Stretch}Blt fallbacks to StretchDIBits.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Apr 18 14:35:21 CDT 2006


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

Author: Huw Davies <huw at codeweavers.com>
Date:   Tue Apr 18 20:00:13 2006 +0100

gdi32: Fix {Bit,Stretch}Blt fallbacks to StretchDIBits.

---

 dlls/gdi/bitblt.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/gdi/bitblt.c b/dlls/gdi/bitblt.c
index 221fc6d..25053e6 100644
--- a/dlls/gdi/bitblt.c
+++ b/dlls/gdi/bitblt.c
@@ -108,8 +108,8 @@ BOOL WINAPI BitBlt( HDC hdcDst, INT xDst
         GetDIBits(hdcSrc, hbm, 0, bm.bmHeight, bits, (BITMAPINFO*)&info_hdr, DIB_RGB_COLORS);
         SelectObject(hdcSrc, hbm);
 
-        lines = StretchDIBits(hdcDst, xDst, yDst, width, height, xSrc, ySrc, width, height,
-                              bits, (BITMAPINFO*)&info_hdr, DIB_RGB_COLORS, rop);
+        lines = StretchDIBits(hdcDst, xDst, yDst, width, height, xSrc, bm.bmHeight - height - ySrc,
+                              width, height, bits, (BITMAPINFO*)&info_hdr, DIB_RGB_COLORS, rop);
 
         HeapFree(GetProcessHeap(), 0, bits);
         return (lines == bm.bmHeight);
@@ -186,8 +186,8 @@ BOOL WINAPI StretchBlt( HDC hdcDst, INT 
         GetDIBits(hdcSrc, hbm, 0, bm.bmHeight, bits, (BITMAPINFO*)&info_hdr, DIB_RGB_COLORS);
         SelectObject(hdcSrc, hbm);
 
-        lines = StretchDIBits(hdcDst, xDst, yDst, widthDst, heightDst, xSrc, ySrc, widthSrc, heightSrc,
-                              bits, (BITMAPINFO*)&info_hdr, DIB_RGB_COLORS, rop);
+        lines = StretchDIBits(hdcDst, xDst, yDst, widthDst, heightDst, xSrc, bm.bmHeight - heightSrc - ySrc,
+                              widthSrc, heightSrc, bits, (BITMAPINFO*)&info_hdr, DIB_RGB_COLORS, rop);
 
         HeapFree(GetProcessHeap(), 0, bits);
         return (lines == bm.bmHeight);




More information about the wine-cvs mailing list