[GRASS5] Re: 5.3 vs 5.7 disparity

Hamish hamish_nospam at yahoo.com
Mon Feb 2 23:11:17 EST 2004


> > > > > > 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,
> > ...
> > > > d.erase is now updated, including support for color=R:G:B.
> > > 
> > > Should Derase() be changing the driver's colour table?
> > 
> > Well, it isn't ideal, but I don't think it hurts anything. The part
> > of the table[*] that is modified is off the end of the chart
> > (MAXCOLORS + 1)..thus ~extending the color table more than
> > "changing" it. If something unrelated is calling that color number,
> > it would be a bug anyway..
> 
> I think that you are confusing the two colour tables.
> 
> The standard colour table is initialised to the colours specified in
> color.h, and cannot be changed. R_standard_color() selects a colour
> from the standard colour table.
> 
> The other colour table is also initialised to the same set of colours.

ok,

> However, the entries may be changed using R_reset_color() and
> R_reset_colors(). R_color() selects colours from this table, as do the
> R_raster* functions.


What I am concerned with is instead of resetting the 14th of 13 colors, 
as intended, I've actually reset color 14 of say 256 or 65536, which 
even if it still works will lead to further confusion in the future..


thanks for the insight,
Hamish




More information about the grass-dev mailing list