Go to the documentation of this file.00001 #include <grass/gis.h>
00002
00003
00004
00028 int G_set_color(CELL cat, int r, int g, int b, struct Colors *colors)
00029 {
00030 CELL tmp = cat;
00031
00032 if (G_is_c_null_value(&tmp))
00033 return G_set_null_value_color(r, g, b, colors);
00034 return G_add_color_rule(cat, r, g, b, cat, r, g, b, colors);
00035 }
00036
00037 int G_set_d_color(DCELL val, int r, int g, int b, struct Colors *colors)
00038 {
00039 DCELL tmp = val;
00040
00041 if (G_is_d_null_value(&tmp))
00042 return G_set_null_value_color(r, g, b, colors);
00043 return G_add_d_raster_color_rule(&val, r, g, b, &val, r, g, b, colors);
00044 }
00045
00046
00059 int G_set_null_value_color(int red, int grn, int blu, struct Colors *colors)
00060 {
00061 colors->null_red = red;
00062 colors->null_grn = grn;
00063 colors->null_blu = blu;
00064 colors->null_set = 1;
00065 return 1;
00066 }
00067
00068
00082 int G_set_default_color(int red, int grn, int blu, struct Colors *colors)
00083 {
00084 colors->undef_red = red;
00085 colors->undef_grn = grn;
00086 colors->undef_blu = blu;
00087 colors->undef_set = 1;
00088 return 1;
00089 }