[GRASS5] Color code cleanup

Hamish hamish_nospam at yahoo.com
Tue Apr 18 05:12:00 EDT 2006

(As I'm sure you've found)
When I added RGB support to a bunch the display modules using
MAXCOLORS+1 type tricks I considered it a bit of an ugly hack and it was
done a little differently for each module. This was partially to get
around the fact that gis.h doesn't have a RGBCOLOR struct in it.
(e.g. SYMBCOLOR in symbol.h)

I'd have such a creature as so:

(in gis.h)

typedef struct {
    int set;  /* 0 unset, 1 set, -1 "none" */
    unsigned char r, g, b;

(RGB_COLOR is already in graphics.h)

FWIW, SYMBCOLOR includes floating point RGB values, but I'm not sure
if they'd ever be used.


More information about the grass-dev mailing list