[GRASS5] R_color vs R_standard_color
cedricgrass at shockfamily.net
Mon Apr 17 19:16:48 EDT 2006
Is there any real difference between R_color and R_standard_color?
Take this example (d.bargraph's background color):
const int customBGcolor = MAXCOLORS + 2;
R_reset_color(customBGcolor, R, G, B);
color1 = customBGcolor;
color1 = D_translate_color (...);
happens. So now color1 is either a number on the range 1 to MAXCOLORS if the
color came from translate_color, or it's MAXCOLORS + 2 if a color was
provided and set. Later, when drawing the box, the following is done:
if(color1 > MAXCOLORS) /* ie custom RGB color */
Is this because:
a.) colors and standard colors really are completely separate but both are
being handled using a single integer with a divided range than a struct.
b.) In the past they were different but now they are the same.
c.) Something else I'm failing to imagine.
More information about the grass-dev