Fix calculating of ScanLines and source point in NtGdiGetDIBitsInternal for top-down bitmaps to more closely mimic win xp behavior. (Timo - high five for your test app)
See issue #5524 for more details.

svn path=/trunk/; revision=50935
This commit is contained in:
Kamil Hornicek 2011-02-28 12:47:01 +00:00
parent c6182beb15
commit 9fb8200d9b

View file

@ -939,9 +939,26 @@ NtGdiGetDIBitsInternal(
rcDest.bottom = ScanLines;
rcDest.right = psurf->SurfObj.sizlBitmap.cx;
srcPoint.x = 0;
srcPoint.y = height < 0 ?
psurf->SurfObj.sizlBitmap.cy - (StartScan + ScanLines) : StartScan;
srcPoint.x = 0;
if(height < 0)
{
srcPoint.y = 0;
if(ScanLines <= StartScan)
{
ScanLines = 1;
SURFACE_ShareUnlockSurface(psurfDest);
GreDeleteObject(hBmpDest);
goto done;
}
ScanLines -= StartScan;
}
else
{
srcPoint.y = StartScan;
}
EXLATEOBJ_vInitialize(&exlo, psurf->ppal, psurfDest->ppal, 0xffffff, 0xffffff, 0);