GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-36359e2344
|
Raster Library - Set colors for raster maps. More...
Go to the source code of this file.
Functions | |
void | Rast_set_c_color (CELL cat, int r, int g, int b, struct Colors *colors) |
Set a category color (CELL) More... | |
void | Rast_set_d_color (DCELL val, int r, int g, int b, struct Colors *colors) |
Set a category color (DCELL) More... | |
void | Rast_set_null_value_color (int red, int grn, int blu, struct Colors *colors) |
Set color for NULL-value. More... | |
void | Rast_set_default_color (int red, int grn, int blu, struct Colors *colors) |
Set default color value. More... | |
Raster Library - Set colors for raster maps.
(C) 2001-2009 by the GRASS Development Team
This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file color_set.c.
Set a category color (CELL)
The red, green, and blue intensities for the color associated with category cat are set in the colors structure. The intensities must be in the range 0 - 255. Values below zero are set as zero, values above 255 are set as 255.
Warning: Use of this routine is discouraged because it defeats the new color logic.
It is provided only for backward compatibility. Overuse can create large color tables. Rast_add_c_color_rule() should be used whenever possible.
Note: The colors structure must have been initialized by G_init_color().
cat | raster cell value |
r | red value |
g | green value |
b | blue value |
colors | pointer to Colors structure which holds color info |
Definition at line 41 of file color_set.c.
Set a category color (DCELL)
See Rast_set_c_color() for detailed information.
val | raster cell value |
r | red value |
g | green value |
b | blue value |
colors | pointer to Colors structure which holds color info |
Definition at line 60 of file color_set.c.
void Rast_set_default_color | ( | int | red, |
int | grn, | ||
int | blu, | ||
struct Colors * | colors | ||
) |
Set default color value.
Sets the default color (in colors) to red, green, blue. This is the color for values which do not have an explicit rule.
red | red value |
grn | green value |
blu | blue value |
colors | pointer to Colors structure which holds color info |
Definition at line 99 of file color_set.c.
Referenced by Rast_abs_log_colors(), and Rast_log_colors().
void Rast_set_null_value_color | ( | int | red, |
int | grn, | ||
int | blu, | ||
struct Colors * | colors | ||
) |
Set color for NULL-value.
Sets the color (in colors) for the NULL-value to red, green, blue.
red | red value |
grn | green value |
blu | blue value |
colors | pointer to Colors structure which holds color info |
Definition at line 79 of file color_set.c.
Referenced by Rast_abs_log_colors(), and Rast_log_colors().