From 906bea525266f65ac6b8d108b310499af7af68c6 Mon Sep 17 00:00:00 2001 From: Gregor Schneider Date: Tue, 27 Jan 2009 15:36:07 +0000 Subject: [PATCH] Update IntEngCreateSrcMonoXlate parameter names and function call with brush colors after logic changes of r38633. Based on the patch of Evgeny Boltik , see bug #4070 for more info. Fixes inverted colors when using hatched brushes. svn path=/trunk/; revision=39134 --- reactos/subsystems/win32/win32k/eng/xlate.c | 8 ++++---- reactos/subsystems/win32/win32k/include/inteng.h | 4 ++-- reactos/subsystems/win32/win32k/objects/brush.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/reactos/subsystems/win32/win32k/eng/xlate.c b/reactos/subsystems/win32/win32k/eng/xlate.c index f254261c37d..9dd6c93b8e6 100644 --- a/reactos/subsystems/win32/win32k/eng/xlate.c +++ b/reactos/subsystems/win32/win32k/eng/xlate.c @@ -358,8 +358,8 @@ IntEngCreateMonoXlate( XLATEOBJ* FASTCALL IntEngCreateSrcMonoXlate(HPALETTE PaletteDest, - ULONG ForegroundColor, - ULONG BackgroundColor) + ULONG Color0, + ULONG Color1) { XLATEOBJ *XlateObj; XLATEGDI *XlateGDI; @@ -404,8 +404,8 @@ IntEngCreateSrcMonoXlate(HPALETTE PaletteDest, 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) { diff --git a/reactos/subsystems/win32/win32k/include/inteng.h b/reactos/subsystems/win32/win32k/include/inteng.h index f7c786f512c..53b1fd00750 100644 --- a/reactos/subsystems/win32/win32k/include/inteng.h +++ b/reactos/subsystems/win32/win32k/include/inteng.h @@ -114,8 +114,8 @@ IntEngCreateMonoXlate(USHORT SourcePalType, XLATEOBJ* FASTCALL IntEngCreateSrcMonoXlate(HPALETTE PaletteDest, - ULONG ForegroundColor, - ULONG BackgroundColor); + ULONG Color0, + ULONG Color1); HPALETTE FASTCALL IntEngGetXlatePalette(XLATEOBJ *XlateObj, diff --git a/reactos/subsystems/win32/win32k/objects/brush.c b/reactos/subsystems/win32/win32k/objects/brush.c index ccec435e82b..ef49fbf8f07 100644 --- a/reactos/subsystems/win32/win32k/objects/brush.c +++ b/reactos/subsystems/win32/win32k/objects/brush.c @@ -153,7 +153,7 @@ IntGdiCreateBrushXlate(PDC Dc, GDIBRUSHOBJ *BrushObj, BOOLEAN *Failed) 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) {