Author: gschneider
Date: Tue Jan 27 09:36:07 2009
New Revision: 39134
URL:
http://svn.reactos.org/svn/reactos?rev=39134&view=rev
Log:
Update IntEngCreateSrcMonoXlate parameter names and function call with brush colors after
logic changes of r38633.
Based on the patch of Evgeny Boltik <bstsoft AT narod DOT ru>, see bug #4070 for
more info.
Fixes inverted colors when using hatched brushes.
Modified:
trunk/reactos/subsystems/win32/win32k/eng/xlate.c
trunk/reactos/subsystems/win32/win32k/include/inteng.h
trunk/reactos/subsystems/win32/win32k/objects/brush.c
Modified: trunk/reactos/subsystems/win32/win32k/eng/xlate.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/eng/xlate.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/eng/xlate.c [iso-8859-1] Tue Jan 27 09:36:07
2009
@@ -358,8 +358,8 @@
XLATEOBJ* FASTCALL
IntEngCreateSrcMonoXlate(HPALETTE PaletteDest,
- ULONG ForegroundColor,
- ULONG BackgroundColor)
+ ULONG Color0,
+ ULONG Color1)
{
XLATEOBJ *XlateObj;
XLATEGDI *XlateGDI;
@@ -404,8 +404,8 @@
XlateGDI->BlueShift = CalculateShift(RGB(0x00, 0x00, 0xFF)) -
CalculateShift(XlateGDI->BlueMask);
/* Yes, that's how Windows works, ... */
- XlateObj->pulXlate[1] = ShiftAndMask(XlateGDI, BackgroundColor);
- XlateObj->pulXlate[0] = ShiftAndMask(XlateGDI, ForegroundColor);
+ XlateObj->pulXlate[1] = ShiftAndMask(XlateGDI, Color1);
+ XlateObj->pulXlate[0] = ShiftAndMask(XlateGDI, Color0);
if (XlateObj->iDstType == PAL_INDEXED)
{
Modified: trunk/reactos/subsystems/win32/win32k/include/inteng.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/inteng.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/inteng.h [iso-8859-1] Tue Jan 27
09:36:07 2009
@@ -114,8 +114,8 @@
XLATEOBJ* FASTCALL
IntEngCreateSrcMonoXlate(HPALETTE PaletteDest,
- ULONG ForegroundColor,
- ULONG BackgroundColor);
+ ULONG Color0,
+ ULONG Color1);
HPALETTE FASTCALL
IntEngGetXlatePalette(XLATEOBJ *XlateObj,
Modified: trunk/reactos/subsystems/win32/win32k/objects/brush.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/brush.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/brush.c [iso-8859-1] Tue Jan 27 09:36:07
2009
@@ -153,7 +153,7 @@
if (!Dc_Attr) Dc_Attr = &Dc->Dc_Attr;
if (Dc->w.bitsPerPixel != 1)
- Result = IntEngCreateSrcMonoXlate(hPalette, BrushObj->BrushAttr.lbColor,
Dc_Attr->crBackgroundClr);
+ Result = IntEngCreateSrcMonoXlate(hPalette, Dc_Attr->crBackgroundClr,
BrushObj->BrushAttr.lbColor);
}
else if (BrushObj->flAttrs & GDIBRUSH_IS_DIB)
{