gdi32: Fix the lines parameter of SetDIBits to be positive.

This commit is contained in:
Huw Davies 2011-07-22 15:10:00 +01:00 committed by Alexandre Julliard
parent 8cc8552a01
commit 3e5793e049
1 changed files with 2 additions and 2 deletions

View File

@ -271,7 +271,7 @@ INT nulldrv_StretchDIBits( PHYSDEV dev, INT xDst, INT yDst, INT widthDst, INT he
bm.bmBitsPixel == bpp && bm.bmPlanes == planes) bm.bmBitsPixel == bpp && bm.bmPlanes == planes)
{ {
/* fast path */ /* fast path */
return SetDIBits( dev->hdc, hBitmap, 0, height, bits, info, coloruse ); return SetDIBits( dev->hdc, hBitmap, 0, abs( height ), bits, info, coloruse );
} }
} }
} }
@ -295,7 +295,7 @@ INT nulldrv_StretchDIBits( PHYSDEV dev, INT xDst, INT yDst, INT widthDst, INT he
StretchBlt( hdcMem, xSrc, abs(height) - heightSrc - ySrc, widthSrc, heightSrc, StretchBlt( hdcMem, xSrc, abs(height) - heightSrc - ySrc, widthSrc, heightSrc,
dev->hdc, xDst, yDst, widthDst, heightDst, rop ); dev->hdc, xDst, yDst, widthDst, heightDst, rop );
} }
ret = SetDIBits( hdcMem, hBitmap, 0, height, bits, info, coloruse ); ret = SetDIBits( hdcMem, hBitmap, 0, abs( height ), bits, info, coloruse );
if (ret) StretchBlt( dev->hdc, xDst, yDst, widthDst, heightDst, if (ret) StretchBlt( dev->hdc, xDst, yDst, widthDst, heightDst,
hdcMem, xSrc, abs(height) - heightSrc - ySrc, widthSrc, heightSrc, rop ); hdcMem, xSrc, abs(height) - heightSrc - ySrc, widthSrc, heightSrc, rop );
DeleteDC( hdcMem ); DeleteDC( hdcMem );