Fixed top-down DIB handling in StretchDIBits32().

This commit is contained in:
Matthew J. Francis 1999-10-24 17:28:23 +00:00 committed by Alexandre Julliard
parent e8ffab62e8
commit ed744e787c
1 changed files with 4 additions and 3 deletions

View File

@ -150,9 +150,10 @@ INT WINAPI StretchDIBits(HDC hdc, INT xDst, INT yDst, INT widthDst,
bits, info, wUsage );
hdcMem = CreateCompatibleDC( hdc );
hOldBitmap = SelectObject( hdcMem, hBitmap );
/* Origin for DIBitmap is bottom left ! */
/* Origin for DIBitmap may be bottom left (positive biHeight) or top
left (negative biHeight) */
StretchBlt( hdc, xDst, yDst, widthDst, heightDst,
hdcMem, xSrc, info->bmiHeader.biHeight - heightSrc - ySrc,
hdcMem, xSrc, abs(info->bmiHeader.biHeight) - heightSrc - ySrc,
widthSrc, heightSrc, dwRop );
SelectObject( hdcMem, hOldBitmap );
DeleteDC( hdcMem );