Index:
[thread]
[date]
[subject]
[author]
From: Steve Cheng <elmert@ipoline.com>
To : ggi-develop@eskimo.com
Date: Wed, 12 Aug 1998 14:45:20 -0400 (EDT)
Re: LibGGI colormapping
On Wed, 12 Aug 1998, Andrew Apted wrote:
> The colormapping inside of LibGGI has always been dodgy, and now's a
> great time to clean that up. [BTW, I was rather surprised to see
> default/linear-*/color.c vanish right before my eyes :)]
>
> Here's the plan: The ggi_visual structure has a "ggi_color *palette"
> field which is non-NULL for GT_PALETTE modes, and contains the current
> palette.
>
> Then, we have a "generic-color" sub-library which implements
> ggiMapColor() and ggiUnmapPixel() for GT_PALETTE modes (using
> vis->palette) and GT_TRUECOLOR modes (using vis->pixelformat) and
> GT_GREYSCALE modes (using a simple formula). It also implements
> ggiPackColors() and ggiUnpackPixels().
Also ggiGetPalette().
Targets setting indexed modes would load the current palette (e.g. X,
minimize flashing), or set it to RGB233 (where it does not matter, e.g.
svgalib).
> Although this could be done in generic-stubs, separating the color
> mapping stuff from the drawing stuff is cleaner IMHO, We could even
> rename "generic-stubs" to "generic-draw" ... that would be nice.
>
> What do you think ? Again I'm happy to implement it.
Good idea. I always wanted to make the color stuff in targets to be common
code, but this is much better.
--
Steve Cheng
email: steve@ggi-project.org
www: <http://shell.ipoline.com/~elmert/>
Index:
[thread]
[date]
[subject]
[author]