17 #include <grass/gis.h> 
   29     struct _Color_Rule_ *
rule;
 
   31     if (colors->fixed.rules) {
 
   33         rule = colors->fixed.rules;
 
   40     if (colors->modular.rules) {
 
   42         rule = colors->modular.rules;
 
   68                        unsigned char *b1, DCELL * 
val2, 
unsigned char *r2,
 
   69                        unsigned char *g2, 
unsigned char *b2,
 
   70                        const struct Colors *colors, 
int rule)
 
   74     const struct _Color_Rule_ *rl;
 
   77     *r1 = *g1 = *b1 = *r2 = *g2 = *b2 = 0;
 
   80     if (colors->fixed.rules) {
 
   81         rl = colors->fixed.rules;
 
   86         while (!found && rl->next) {
 
   93     if (!found && colors->modular.rules) {
 
   94         rl = colors->modular.rules;
 
   99         while (!found && rl->next) {
 
  111     *val1 = rl->low.value;
 
  112     *val2 = rl->high.value;
 
int G_colors_count(const struct Colors *colors)
Get both modular and fixed rules count. 
int G_get_f_color_rule(DCELL *val1, unsigned char *r1, unsigned char *g1, unsigned char *b1, DCELL *val2, unsigned char *r2, unsigned char *g2, unsigned char *b2, const struct Colors *colors, int rule)
Get color rule from both modular and fixed rules.