nanogui: Images and palette
Subject:
Re: [nanogui] Images and palette
From:
Alex Holden ####@####.####
Date:
29 May 2002 07:57:51 -0000
Message-Id: <3CF48798.8080209@linuxhacker.org>
Fabrice Gautier wrote:
> When i display images, nano-X seems to modify the palette, but it doesnt
> seem to be good at it.
Yes, the simple algorithm it uses is terrible, and it doesn't force a
redraw either after it messes with the palette. The symptom I was seeing
was that displaying an image with a lot of colours "stole" a lot of the
colours which other things on the screen were already using, and then it
doesn't even force a redraw so all the colours are messed up until you
wave a window around the screen forcing it to redraw everything. I got
much better results simply fixing the palette so the colours never get
automatically redefined.
> I would like to have a fixed palette, that only the user changes, how can i
> do that?
In my tree you can change FIXEDPALETTE to 1 in device.h to disable the
dynamic palette stuff (actually I think I left that as default). You
should be able to set the palette yourself with GrSetSystemPalette().
http://www.linuxhacker.org/pub/cvs-snapshots/microwin-aph/
--
------------ Alex Holden - http://www.linuxhacker.org ------------
If it doesn't work, you're not hitting it with a big enough hammer