|
GRASS 8 Programmer's Manual 8.6.0dev(2026)-1d1e47ad9d
|
Raster Library - Color rules. More...

Go to the source code of this file.
Macros | |
| #define | LIMIT(x) |
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.
| #define LIMIT | ( | x | ) |
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 76 of file color_rule.c.
References CELL_TYPE, Colors::cmax, Colors::cmin, Colors::fixed, and Colors::version.
Referenced by IL_output_2d(), IL_resample_output_2d(), Rast_histogram_eq_colors(), Rast_make_histogram_eq_colors(), Rast_make_histogram_log_colors(), and Rast_set_c_color().
| 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.
References Colors::cmax, Colors::cmin, Colors::fixed, and Colors::version.
| 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 38 of file color_rule.c.
References Colors::cmax, Colors::cmin, DCELL_TYPE, Colors::fixed, and Colors::version.
Referenced by IL_resample_output_2d(), Rast_abs_log_colors(), Rast_histogram_eq_fp_colors(), Rast_log_colors(), Rast_read_color_rules(), and Rast_set_d_color().
| 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 57 of file color_rule.c.
References Colors::cmax, Colors::cmin, FCELL_TYPE, Colors::fixed, and Colors::version.
Referenced by IL_output_2d(), and IL_resample_output_2d().
| 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.
References CELL_TYPE, Colors::cmax, Colors::cmin, max, min, Colors::modular, and Colors::version.
Referenced by Rast_make_random_colors().
| 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.
References Colors::cmax, Colors::cmin, max, min, Colors::modular, and Colors::version.
| 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.
References Colors::cmax, Colors::cmin, DCELL_TYPE, max, min, Colors::modular, and Colors::version.
Referenced by IL_resample_output_2d().
| 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.
References Colors::cmax, Colors::cmin, FCELL_TYPE, max, min, Colors::modular, and Colors::version.