mirror of
https://github.com/reactos/reactos.git
synced 2025-01-04 05:20:54 +00:00
[WIN32K]
- in 1bpp bitmaps, 0 means white. Take that into in SetDIBits - fix a fixme in XLATEOBJ implementation - remove useless field from ROS_DCINFO Fixes fox audio player GUI :-) Enjoy! svn path=/trunk/; revision=50949
This commit is contained in:
parent
c77754b87d
commit
5e5532d3ef
4 changed files with 7 additions and 14 deletions
|
@ -418,9 +418,9 @@ EXLATEOBJ_vInitialize(
|
|||
else if (ppalSrc->flFlags & PAL_BITFIELDS)
|
||||
{
|
||||
PALETTE_vGetBitMasks(ppalSrc, &pexlo->ulRedMask);
|
||||
pexlo->ulRedShift = CalculateShift(0xFF, pexlo->ulRedMask);
|
||||
pexlo->ulGreenShift = CalculateShift(0xFF00, pexlo->ulGreenMask);
|
||||
pexlo->ulBlueShift = CalculateShift(0xFF0000, pexlo->ulBlueMask);
|
||||
pexlo->ulRedShift = CalculateShift(RGB(0xFF,0,0), pexlo->ulRedMask);
|
||||
pexlo->ulGreenShift = CalculateShift(RGB(0,0xFF,0), pexlo->ulGreenMask);
|
||||
pexlo->ulBlueShift = CalculateShift(RGB(0,0,0xFF), pexlo->ulBlueMask);
|
||||
|
||||
pexlo->aulXlate[0] = EXLATEOBJ_iXlateShiftAndMask(pexlo, crSrcBackColor);
|
||||
}
|
||||
|
@ -480,18 +480,12 @@ EXLATEOBJ_vInitialize(
|
|||
}
|
||||
else
|
||||
{
|
||||
// FIXME: use PALETTE_ulGetNearest
|
||||
EXLATEOBJ exloTmp = *pexlo;
|
||||
exloTmp.xlo.pulXlate = exloTmp.aulXlate;
|
||||
|
||||
pexlo->xlo.flXlate |= XO_TABLE;
|
||||
for (i = 0; i < pexlo->xlo.cEntries; i++)
|
||||
{
|
||||
ulColor = RGB(ppalSrc->IndexedColors[i].peRed,
|
||||
ppalSrc->IndexedColors[i].peGreen,
|
||||
ppalSrc->IndexedColors[i].peBlue);
|
||||
pexlo->xlo.pulXlate[i] =
|
||||
EXLATEOBJ_iXlateShiftAndMask(&exloTmp, ulColor);
|
||||
pexlo->xlo.pulXlate[i] = PALETTE_ulGetNearestBitFieldsIndex(ppalDst, ulColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,9 +55,6 @@ typedef struct _ROS_DC_INFO
|
|||
HRGN hGCClipRgn; /* GC clip region (ClipRgn AND VisRgn) */
|
||||
|
||||
CLIPOBJ *CombinedClip;
|
||||
|
||||
UNICODE_STRING DriverName;
|
||||
|
||||
} ROS_DC_INFO;
|
||||
|
||||
typedef struct _DCLEVEL
|
||||
|
|
|
@ -81,6 +81,7 @@ INT FASTCALL PALETTE_ToPhysical (PDC dc, COLORREF color);
|
|||
INT FASTCALL PALETTE_GetObject(PPALETTE pGdiObject, INT cbCount, LPLOGBRUSH lpBuffer);
|
||||
ULONG NTAPI PALETTE_ulGetNearestPaletteIndex(PALETTE* ppal, ULONG iColor);
|
||||
ULONG NTAPI PALETTE_ulGetNearestIndex(PALETTE* ppal, ULONG iColor);
|
||||
ULONG NTAPI PALETTE_ulGetNearestBitFieldsIndex(PALETTE* ppal, ULONG ulColor);
|
||||
VOID NTAPI PALETTE_vGetBitMasks(PPALETTE ppal, PULONG pulColors);
|
||||
|
||||
PPALETTEENTRY FASTCALL ReturnSystemPalette (VOID);
|
||||
|
|
|
@ -295,7 +295,8 @@ IntSetDIBits(
|
|||
ptSrc.x = 0;
|
||||
ptSrc.y = 0;
|
||||
|
||||
EXLATEOBJ_vInitialize(&exlo, psurfSrc->ppal, psurfDst->ppal, 0, 0, 0);
|
||||
/* 1bpp bitmaps have 0 for white, 1 for black */
|
||||
EXLATEOBJ_vInitialize(&exlo, psurfSrc->ppal, psurfDst->ppal, 0xFFFFFF, 0, 0);
|
||||
|
||||
result = IntEngCopyBits(&psurfDst->SurfObj,
|
||||
&psurfSrc->SurfObj,
|
||||
|
|
Loading…
Reference in a new issue