Index:
[thread]
[date]
[subject]
[author]
From: Andrew Apted <ajapted@netspace.net.au>
To : ggi-develop@eskimo.com
Date: Wed, 12 Aug 1998 14:43:46 +1000
LibGGI colormapping
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().
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.
Cheers,
_____________________________________________ ____
\ /
Andrew Apted <andrew@ggi-project.org> \/
Index:
[thread]
[date]
[subject]
[author]