Brush colors

Filip Navara xnavara at
Fri Oct 8 01:52:16 CDT 2004

Jon Griffiths wrote:
> Hi,
> --- Filip Navara <xnavara at> wrote:
>>palette as opposed to the system palette (RGB macro) and the value
>>is constructed as (COLORREF)(0x2000000 | RGB(R, G, B)).
> Yes, its using this value. I have the source for the app and it seems
> to imply that it will choose the closest color from the selected DC
> palette in the event that it is not a true color DC.
> I don't know if we should pass the value unmodified to the graphics
> driver and mask it out/deal with it there, But I'm sire someone will
> pipe up if he patch isn't right :-)

The X11 driver handles the brush color right way if it's created with PALETTEINDEX or 
PALLETTERGB. The relevant code is X11DRV:BRUSH_SelectSolidBrush + 
X11DRV:X11DRV_PALETTE_ToPhysical. So I think your patch isn't really correct, because it 
will break brushes created with PALETTEINDEX and match stock brushes with PALLETTERGB 
colors (which isn't right either on non-true color surfaces).


More information about the wine-devel mailing list