[GRASS5] Re: 5.3 vs 5.7 disparity
Glynn Clements
glynn.clements at virgin.net
Sun Feb 1 10:03:34 EST 2004
Hamish wrote:
> > > use of DEFAULT_FG_COLOR/DEFAULT_BG_COLOR for G5.7 compliance
> >
> > 1. Neither XDRIVER nor d.erase use these macros. d.erase could be
> > changed easily enough, but doing it for XDRIVER would be more work (we
> > would need to add code to parse a string to an R/G/B triple).
>
> d.erase is now updated, including support for color=R:G:B.
Should Derase() be changing the driver's colour table?
> I've left XDRIVER alone as I'm not very familiar with it.
I can add code to handle R:G:B easily enough, but the default settings
of DEFAULT_FG_COLOR and DEFAULT_BG_COLOR are "white" and "black".
Actually, I could add code to handle named colours easily enough (with
D_translate_color() plus the code which is already in the driver to
select standard colours). However:
1. Using D_translate_color() requires libdisplay, but I'm not sure
that display drivers should be using libdisplay (currently, they don't
even use libraster).
2. Implementing a D_translate_color() clone would require the two to
be kept in sync.
Basically, I'm wondering where the definitions of standard colours
(i.e. their names, indices and R/G/B values) should reside; maybe it
belongs in libraster or even libgis?
--
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-dev
mailing list