color_set.c

Go to the documentation of this file.
00001 #include "gis.h"
00002 
00003 /* for convenience, but to be avoided if possible */
00004 
00028 int G_set_color (
00029     CELL cat,int r,int g, int b,
00030     struct Colors *colors)
00031 {
00032     CELL tmp=cat;
00033 
00034     if(G_is_c_null_value(&tmp))
00035        return G_set_null_value_color(r, g, b, colors);
00036     return G_add_color_rule (cat, r,g,b, cat, r,g,b, colors);
00037 }
00038 
00039 int G_set_d_color (val, r, g, b, colors)
00040     DCELL val;
00041     struct Colors *colors;
00042 {
00043     DCELL tmp=val;
00044     if(G_is_d_null_value(&tmp))
00045        return G_set_null_value_color(r, g, b, colors);
00046     return G_add_d_raster_color_rule (&val, r,g,b, 
00047                                       &val, r,g,b, colors);
00048 }
00049 
00050 
00063 int G_set_null_value_color(red, grn, blu, colors)
00064    int red, blu, grn;
00065    struct Colors *colors;
00066 
00067 {
00068         colors->null_red = red;
00069         colors->null_grn = grn;
00070         colors->null_blu = blu;
00071         colors->null_set = 1;
00072         return 1;
00073 }
00074 
00075 
00089 int G_set_default_color(red, grn, blu, colors)
00090    int red, blu, grn;
00091    struct Colors *colors;
00092 
00093 {
00094         colors->undef_red = red;
00095         colors->undef_grn = grn;
00096         colors->undef_blu = blu;
00097         colors->undef_set = 1;
00098         return 1;
00099 }
00100 

Generated on Sat Jul 22 22:06:14 2006 for GRASS by  doxygen 1.4.7