mirror of
https://github.com/reactos/reactos
synced 2025-10-05 16:02:58 +02:00
[NTGDI][GDI32] SAI Paint Tool regression fix (#8383)
CORE-20336 Move some code in win32ss/gdi/ntgdi/dibobj.c into win32ss/gdi/gdi32/objects/bitmap.c. Condition "YSrc = 0;" on "if (Height + YDest + 1 < ScanLines)" which fixes some gdi32:bitmap regressions.
This commit is contained in:
@@ -982,6 +982,17 @@ SetDIBitsToDevice(
|
||||
}
|
||||
}
|
||||
|
||||
if (YDest >= 0)
|
||||
{
|
||||
ScanLines = min(abs(Height), ScanLines);
|
||||
if (YSrc > 0)
|
||||
{
|
||||
ScanLines += YSrc;
|
||||
if (Height + YDest + 1 < ScanLines)
|
||||
YSrc = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
if ( !pDc_Attr || // DC is Public
|
||||
ColorUse == DIB_PAL_COLORS ||
|
||||
|
@@ -528,16 +528,7 @@ NtGdiSetDIBitsToDeviceInternal(
|
||||
bmi->bmiHeader.biBitCount,
|
||||
XSrc, YSrc, XDest, YDest);
|
||||
|
||||
if (YDest >= 0)
|
||||
{
|
||||
ScanLines = min(abs(Height), ScanLines);
|
||||
if (YSrc > 0)
|
||||
{
|
||||
ScanLines += YSrc;
|
||||
YSrc = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (YDest < 0)
|
||||
{
|
||||
ScanLines = min(ScanLines, abs(bmi->bmiHeader.biHeight) - StartScan);
|
||||
}
|
||||
|
Reference in New Issue
Block a user