GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-36359e2344
|
Raster Library - Get colors from a raster map. More...
Go to the source code of this file.
Functions | |
int | Rast_get_color (const void *rast, int *red, int *grn, int *blu, struct Colors *colors, RASTER_MAP_TYPE map_type) |
Gets color from raster map. More... | |
int | Rast_get_c_color (const CELL *rast, int *red, int *grn, int *blu, struct Colors *colors) |
Gets color from raster map (CELL) More... | |
int | Rast_get_f_color (const FCELL *rast, int *red, int *grn, int *blu, struct Colors *colors) |
Gets color from raster map (FCELL) More... | |
int | Rast_get_d_color (const DCELL *rast, int *red, int *grn, int *blu, struct Colors *colors) |
Gets color from raster map (DCELL) More... | |
void | Rast_get_null_value_color (int *red, int *grn, int *blu, const struct Colors *colors) |
Gets color for null value. More... | |
void | Rast_get_default_color (int *red, int *grn, int *blu, const struct Colors *colors) |
Gets default color. More... | |
Raster Library - Get colors from a raster map.
(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_get.c.
Gets color from raster map (CELL)
Looks up the rgb colors for rast in the color table colors.
rast | raster cell value | |
[out] | red | red value |
[out] | grn | green value |
[out] | blu | blue value |
colors | pointer to Colors structure which holds color info |
Definition at line 67 of file color_get.c.
int Rast_get_color | ( | const void * | rast, |
int * | red, | ||
int * | grn, | ||
int * | blu, | ||
struct Colors * | colors, | ||
RASTER_MAP_TYPE | map_type | ||
) |
Gets color from raster map.
Looks up the rgb colors for rast in the color table colors.
The red, green, and blue intensities for the color associated with category n are extracted from the colors structure. The intensities will be in the range 0 -
rast | raster cell value | |
[out] | red | red value |
[out] | grn | green value |
[out] | blu | blue value |
colors | pointer to Colors structure which holds color info | |
map_type | map type (CELL, FCELL, DCELL) |
Definition at line 38 of file color_get.c.
int Rast_get_d_color | ( | const DCELL * | rast, |
int * | red, | ||
int * | grn, | ||
int * | blu, | ||
struct Colors * | colors | ||
) |
Gets color from raster map (DCELL)
Looks up the rgb colors for rast in the color table colors.
rast | raster cell value | |
[out] | red | red value |
[out] | grn | green value |
[out] | blu | blue value |
colors | pointer to Colors structure which holds color info |
Definition at line 109 of file color_get.c.
Referenced by Rast_abs_log_colors(), and Rast_log_colors().
void Rast_get_default_color | ( | int * | red, |
int * | grn, | ||
int * | blu, | ||
const struct Colors * | colors | ||
) |
Gets default color.
Puts the red, green, and blue components of the "default"
color into red, grn, and blu.
[out] | red | red value |
[out] | grn | green value |
[out] | blu | blue value |
colors | pointer to Colors structure which holds color info |
Definition at line 154 of file color_get.c.
Referenced by Rast_abs_log_colors(), and Rast_log_colors().
int Rast_get_f_color | ( | const FCELL * | rast, |
int * | red, | ||
int * | grn, | ||
int * | blu, | ||
struct Colors * | colors | ||
) |
Gets color from raster map (FCELL)
Looks up the rgb colors for rast in the color table colors.
rast | raster cell value | |
[out] | red | red value |
[out] | grn | green value |
[out] | blu | blue value |
colors | pointer to Colors structure which holds color info |
Definition at line 88 of file color_get.c.
Referenced by Gvl_get_color_for_value().
void Rast_get_null_value_color | ( | int * | red, |
int * | grn, | ||
int * | blu, | ||
const struct Colors * | colors | ||
) |
Gets color for null value.
Puts the red, green, and blue components of colors for the NULL-value into red, grn, and blu.
[out] | red | red value |
[out] | grn | green value |
[out] | blu | blue value |
colors | pointer to Colors structure which holds color info |
Definition at line 126 of file color_get.c.
Referenced by Rast_abs_log_colors(), and Rast_log_colors().