17 #include <grass/gis.h>
36 int G_get_color(CELL
n,
int *red,
int *grn,
int *blu,
struct Colors *colors)
39 unsigned char r,
g,
b,
set;
68 int *red,
int *grn,
int *blu,
69 struct Colors *colors, RASTER_MAP_TYPE map_type)
71 unsigned char r,
g,
b,
set;
98 int *red,
int *grn,
int *blu,
struct Colors *colors)
119 int *red,
int *grn,
int *blu,
struct Colors *colors)
140 int *red,
int *grn,
int *blu,
struct Colors *colors)
160 const struct Colors *colors)
162 if (colors->null_set) {
163 *red = (
int)colors->null_red;
164 *grn = (
int)colors->null_grn;
165 *blu = (
int)colors->null_blu;
167 else if (colors->undef_set) {
168 *red = (
int)colors->undef_red;
169 *grn = (
int)colors->undef_grn;
170 *blu = (
int)colors->undef_blu;
173 *red = *blu = *grn = 255;
193 const struct Colors *colors)
195 if (colors->undef_set) {
196 *red = (
int)colors->undef_red;
197 *grn = (
int)colors->undef_grn;
198 *blu = (
int)colors->undef_blu;
201 *red = *blu = *grn = 255;
int G_lookup_raster_colors(const void *raster, unsigned char *red, unsigned char *grn, unsigned char *blu, unsigned char *set, int n, struct Colors *colors, RASTER_MAP_TYPE map_type)
If the cell_type is CELL_TYPE, calls G_lookup_colors((CELL *)cell, r, g, b, set, n, colors); If the cell_type is FCELL_TYPE, calls G_lookup_f_raster_colors(FCELL *)cell, r, g, b, set, n, colors); If the cell_type is DCELL_TYPE, calls G_lookup_d_raster_colors(DCELL *)cell, r, g, b, set, n, colors);.
int G_get_null_value_color(int *red, int *grn, int *blu, const struct Colors *colors)
Gets color for null value.
int G_lookup_colors(const CELL *cell, unsigned char *red, unsigned char *grn, unsigned char *blu, unsigned char *set, int n, struct Colors *colors)
lookup an array of colors
int G_get_raster_color(const void *rast, int *red, int *grn, int *blu, struct Colors *colors, RASTER_MAP_TYPE map_type)
Gets color from raster.
int G_get_c_raster_color(const CELL *rast, int *red, int *grn, int *blu, struct Colors *colors)
Gets color for a CELL raster.
int G_get_d_raster_color(const DCELL *rast, int *red, int *grn, int *blu, struct Colors *colors)
Gets color for a DCELL raster.
int G_get_default_color(int *red, int *grn, int *blu, const struct Colors *colors)
Gets default color.
int G_get_color(CELL n, int *red, int *grn, int *blu, struct Colors *colors)
Get a category color.
int G_get_f_raster_color(const FCELL *rast, int *red, int *grn, int *blu, struct Colors *colors)
Gets color for a FCELL raster.