GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
|
Raster Library - Color rules. More...
Go to the source code of this file.
Macros | |
#define | LIMIT(x) if (x < 0) x = 0; else if (x > 255) x = 255; |
Functions | |
void | Rast_add_d_color_rule (const DCELL *val1, int r1, int g1, int b1, const DCELL *val2, int r2, int g2, int b2, struct Colors *colors) |
Adds the floating-point color rule (DCELL version) More... | |
void | Rast_add_f_color_rule (const FCELL *cat1, int r1, int g1, int b1, const FCELL *cat2, int r2, int g2, int b2, struct Colors *colors) |
Adds the floating-point color rule (FCELL version) More... | |
void | Rast_add_c_color_rule (const CELL *cat1, int r1, int g1, int b1, const CELL *cat2, int r2, int g2, int b2, struct Colors *colors) |
Adds the integer color rule (CELL version) More... | |
void | Rast_add_color_rule (const void *val1, int r1, int g1, int b1, const void *val2, int r2, int g2, int b2, struct Colors *colors, RASTER_MAP_TYPE data_type) |
Adds the color rule. More... | |
int | Rast_add_modular_d_color_rule (const DCELL *val1, int r1, int g1, int b1, const DCELL *val2, int r2, int g2, int b2, struct Colors *colors) |
Add modular floating-point color rule (DCELL version) More... | |
int | Rast_add_modular_f_color_rule (const FCELL *val1, int r1, int g1, int b1, const FCELL *val2, int r2, int g2, int b2, struct Colors *colors) |
Add modular floating-point color rule (FCELL version) More... | |
int | Rast_add_modular_c_color_rule (const CELL *val1, int r1, int g1, int b1, const CELL *val2, int r2, int g2, int b2, struct Colors *colors) |
Add modular integer color rule (CELL version) More... | |
int | Rast_add_modular_color_rule (const void *val1, int r1, int g1, int b1, const void *val2, int r2, int g2, int b2, struct Colors *colors, RASTER_MAP_TYPE data_type) |
Add modular color rule. More... | |
Raster Library - Color rules.
(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_rule.c.
Definition at line 17 of file color_rule.c.
void Rast_add_c_color_rule | ( | const CELL * | cat1, |
int | r1, | ||
int | g1, | ||
int | b1, | ||
const CELL * | cat2, | ||
int | r2, | ||
int | g2, | ||
int | b2, | ||
struct Colors * | colors | ||
) |
Adds the integer color rule (CELL version)
See Rast_add_color_rule() for details.
cat1 | cell value | |
r1,g1,b1 | color value | |
cat2 | cell value | |
r2,g2,b2 | color value | |
[in,out] | colors | pointer to color table structure |
Definition at line 75 of file color_rule.c.
void Rast_add_color_rule | ( | const void * | val1, |
int | r1, | ||
int | g1, | ||
int | b1, | ||
const void * | val2, | ||
int | r2, | ||
int | g2, | ||
int | b2, | ||
struct Colors * | colors, | ||
RASTER_MAP_TYPE | data_type | ||
) |
Adds the color rule.
Adds the floating-point rule that the range [v1,v2] gets a linear ramp of colors from [r1,g1,b1] to [r2,g2,b2]. If either v1 or v2 is the NULL-value, this call is converted ino Rast_set_null_value_color (r1, g1, b1, colors)
val1 | cell value | |
r1,g1,b1 | color value | |
val2 | cell value | |
r2,g2,b2 | color value | |
[in,out] | colors | pointer to color table structure |
data_type | raster data type (CELL, FCELL, DCELL) |
Definition at line 104 of file color_rule.c.
void Rast_add_d_color_rule | ( | const DCELL * | val1, |
int | r1, | ||
int | g1, | ||
int | b1, | ||
const DCELL * | val2, | ||
int | r2, | ||
int | g2, | ||
int | b2, | ||
struct Colors * | colors | ||
) |
Adds the floating-point color rule (DCELL version)
See Rast_add_color_rule() for details.
val1 | cell value | |
r1,g1,b1 | color value | |
val2 | cell value | |
r2,g2,b2 | color value | |
[in,out] | colors | pointer to color table structure |
Definition at line 35 of file color_rule.c.
void Rast_add_f_color_rule | ( | const FCELL * | cat1, |
int | r1, | ||
int | g1, | ||
int | b1, | ||
const FCELL * | cat2, | ||
int | r2, | ||
int | g2, | ||
int | b2, | ||
struct Colors * | colors | ||
) |
Adds the floating-point color rule (FCELL version)
See Rast_add_color_rule() for details.
cat1 | cell value | |
r1,g1,b1 | color value | |
cat2 | cell value | |
r2,g2,b2 | color value | |
[in,out] | colors | pointer to color table structure |
Definition at line 55 of file color_rule.c.
int Rast_add_modular_c_color_rule | ( | const CELL * | val1, |
int | r1, | ||
int | g1, | ||
int | b1, | ||
const CELL * | val2, | ||
int | r2, | ||
int | g2, | ||
int | b2, | ||
struct Colors * | colors | ||
) |
Add modular integer color rule (CELL version)
val1 | cell value | |
r1,g1,b1 | color value | |
val2 | cell value | |
r2,g2,b2 | color value | |
[in,out] | colors | pointer to color table structure |
Definition at line 184 of file color_rule.c.
int Rast_add_modular_color_rule | ( | const void * | val1, |
int | r1, | ||
int | g1, | ||
int | b1, | ||
const void * | val2, | ||
int | r2, | ||
int | g2, | ||
int | b2, | ||
struct Colors * | colors, | ||
RASTER_MAP_TYPE | data_type | ||
) |
Add modular color rule.
val1 | cell value | |
r1,g1,b1 | color value | |
val2 | cell value | |
r2,g2,b2 | color value | |
[in,out] | colors | pointer to color table structure |
data_type | raster data type |
Definition at line 218 of file color_rule.c.
int Rast_add_modular_d_color_rule | ( | const DCELL * | val1, |
int | r1, | ||
int | g1, | ||
int | b1, | ||
const DCELL * | val2, | ||
int | r2, | ||
int | g2, | ||
int | b2, | ||
struct Colors * | colors | ||
) |
Add modular floating-point color rule (DCELL version)
val1 | cell value | |
r1,g1,b1 | color value | |
val2 | cell value | |
r2,g2,b2 | color value | |
[in,out] | colors | pointer to color table structure |
Definition at line 124 of file color_rule.c.
int Rast_add_modular_f_color_rule | ( | const FCELL * | val1, |
int | r1, | ||
int | g1, | ||
int | b1, | ||
const FCELL * | val2, | ||
int | r2, | ||
int | g2, | ||
int | b2, | ||
struct Colors * | colors | ||
) |
Add modular floating-point color rule (FCELL version)
val1 | cell value | |
r1,g1,b1 | color value | |
val2 | cell value | |
r2,g2,b2 | color value | |
[in,out] | colors | pointer to color table structure |
Definition at line 154 of file color_rule.c.