mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 00:16:40 +00:00
[WIN32K]
When a DC has the default palette selected, use the color value from PALETTERGB() directly instead of looking it up in the dc palette (just as the code was before). Fixes skipped bitmap winetests svn path=/trunk/; revision=56440
This commit is contained in:
parent
d926eda7ce
commit
4d93b7e8d5
1 changed files with 13 additions and 5 deletions
|
@ -41,12 +41,20 @@ TranslateCOLORREF(PDC pdc, COLORREF *pcrColor)
|
|||
|
||||
case 0x02: /* PALETTERGB */
|
||||
|
||||
/* First find the nearest index in the dc palette */
|
||||
ppalDC = pdc->dclevel.ppal;
|
||||
index = PALETTE_ulGetNearestIndex(ppalDC, crColor & 0xFFFFFF);
|
||||
if (pdc->dclevel.hpal != StockObjects[DEFAULT_PALETTE])
|
||||
{
|
||||
/* First find the nearest index in the dc palette */
|
||||
ppalDC = pdc->dclevel.ppal;
|
||||
index = PALETTE_ulGetNearestIndex(ppalDC, crColor & 0xFFFFFF);
|
||||
|
||||
/* Get the RGB value */
|
||||
crColor = PALETTE_ulGetRGBColorFromIndex(ppalDC, index);
|
||||
/* Get the RGB value */
|
||||
crColor = PALETTE_ulGetRGBColorFromIndex(ppalDC, index);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Use the pure color */
|
||||
crColor = crColor & 0x00FFFFFF;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x10: /* DIBINDEX */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue