gdi32: Fix {Bit,Stretch}Blt fallbacks to StretchDIBits
Huw Davies
h.davies1 at physics.ox.ac.uk
Tue Apr 18 14:00:13 CDT 2006
Huw Davies <huw at codeweavers.com>
gdi32: Fix {Bit,Stretch}Blt fallbacks to StretchDIBits
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-patches
mailing list