patch by Jeffrey Morlan ( email : mrnobo1024 at yahoo dot com )
authorMagnus Olsen <magnus@greatlord.com>
Thu, 29 May 2008 22:39:39 +0000 (22:39 +0000)
committerMagnus Olsen <magnus@greatlord.com>
Thu, 29 May 2008 22:39:39 +0000 (22:39 +0000)
the comment above is my.
See issue #3295 for more details.

svn path=/trunk/; revision=33763

reactos/subsystems/win32/win32k/objects/dibobj.c

index 3dc3417..bbc598a 100644 (file)
@@ -812,7 +812,12 @@ NtGdiStretchDIBitsInternal(
 
    pDC = DC_LockDc(hdcMem);
 
-   IntSetDIBits(pDC, hBitmap, 0, BitsInfo->bmiHeader.biHeight, Bits,
+   /* Note BitsInfo->bmiHeader.biHeight is the number of scanline, 
+    * if it negitve we getting to many scanline for scanline is UINT not
+    * a INT, so we need make the negtive value to positve and that make the
+    * count correct for negtive bitmap, TODO : we need testcase for this api */
+
+   IntSetDIBits(pDC, hBitmap, 0, abs(BitsInfo->bmiHeader.biHeight), Bits,
                   BitsInfo, Usage);
 
    DC_UnlockDc(pDC);