From f1ac4ef72b01bfaa7f9623d467f553714e8c71dd Mon Sep 17 00:00:00 2001 From: Dirk Thierbach Date: Sun, 15 Nov 1998 17:25:44 +0000 Subject: [PATCH] Fixed bug in StretchDIBits32 (wrong origin). --- objects/dib.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/objects/dib.c b/objects/dib.c index 81f20fbb8cb..24097503ae1 100644 --- a/objects/dib.c +++ b/objects/dib.c @@ -142,8 +142,10 @@ INT32 WINAPI StretchDIBits32(HDC32 hdc, INT32 xDst, INT32 yDst, INT32 widthDst, bits, info, wUsage ); hdcMem = CreateCompatibleDC32( hdc ); hOldBitmap = SelectObject32( hdcMem, hBitmap ); - StretchBlt32( hdc, xDst, yDst, widthDst, heightDst, - hdcMem, xSrc, ySrc, widthSrc, heightSrc, dwRop ); + /* Origin for DIBitmap is bottom left ! */ + StretchBlt32( hdc, xDst, yDst, widthDst, heightDst, + hdcMem, xSrc, info->bmiHeader.biHeight - heightSrc - ySrc, + widthSrc, heightSrc, dwRop ); SelectObject32( hdcMem, hOldBitmap ); DeleteDC32( hdcMem ); DeleteObject32( hBitmap );