GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
#include <stdio.h>
#include <grass/gis.h>
#include <grass/glocale.h>
Go to the source code of this file.
Data Structures | |
struct | rule |
Enumerations | |
enum | rule_error { CR_OK = 0, CR_ERROR_SYNTAX, CR_ERROR_RGB, CR_ERROR_COLOR, CR_ERROR_PERCENT, CR_ERROR_VALUE } |
Functions | |
int | G_parse_color_rule (DCELL min, DCELL max, const char *buf, DCELL *val, int *r, int *g, int *b, int *norm, int *nval, int *dflt) |
const char * | G_parse_color_rule_error (int code) |
int | G_read_color_rule (void *closure, DCELL min, DCELL max, DCELL *val, int *r, int *g, int *b, int *norm, int *nval, int *dflt) |
int | G_read_color_rules (struct Colors *colors, DCELL min, DCELL max, read_rule_fn *read_rule, void *closure) |
int | G_load_colors (struct Colors *colors, const char *path, CELL min, CELL max) |
int | G_load_fp_colors (struct Colors *colors, const char *path, DCELL min, DCELL max) |
int | G_make_colors (struct Colors *colors, const char *name, CELL min, CELL max) |
int | G_make_fp_colors (struct Colors *colors, const char *name, DCELL min, DCELL max) |
enum rule_error |
Enumerator | |
---|---|
CR_OK | |
CR_ERROR_SYNTAX | |
CR_ERROR_RGB | |
CR_ERROR_COLOR | |
CR_ERROR_PERCENT | |
CR_ERROR_VALUE |
Definition at line 34 of file color_rules.c.
int G_load_colors | ( | struct Colors * | colors, |
const char * | path, | ||
CELL | min, | ||
CELL | max | ||
) |
Definition at line 245 of file color_rules.c.
int G_load_fp_colors | ( | struct Colors * | colors, |
const char * | path, | ||
DCELL | min, | ||
DCELL | max | ||
) |
Definition at line 250 of file color_rules.c.
int G_make_colors | ( | struct Colors * | colors, |
const char * | name, | ||
CELL | min, | ||
CELL | max | ||
) |
Definition at line 272 of file color_rules.c.
Referenced by G_make_aspect_colors(), G_make_bgyr_colors(), G_make_byg_colors(), G_make_byr_colors(), G_make_grey_scale_colors(), G_make_gyr_colors(), G_make_rainbow_colors(), G_make_ramp_colors(), G_make_ryg_colors(), and G_make_wave_colors().
int G_make_fp_colors | ( | struct Colors * | colors, |
const char * | name, | ||
DCELL | min, | ||
DCELL | max | ||
) |
Definition at line 277 of file color_rules.c.
Referenced by G_make_aspect_fp_colors(), G_make_bgyr_fp_colors(), G_make_byg_fp_colors(), G_make_byr_fp_colors(), G_make_grey_scale_fp_colors(), G_make_gyr_fp_colors(), G_make_rainbow_fp_colors(), G_make_ramp_fp_colors(), G_make_ryg_fp_colors(), and G_make_wave_fp_colors().
int G_parse_color_rule | ( | DCELL | min, |
DCELL | max, | ||
const char * | buf, | ||
DCELL * | val, | ||
int * | r, | ||
int * | g, | ||
int * | b, | ||
int * | norm, | ||
int * | nval, | ||
int * | dflt | ||
) |
Definition at line 44 of file color_rules.c.
References tools::color, CR_ERROR_COLOR, CR_ERROR_PERCENT, CR_ERROR_RGB, CR_ERROR_SYNTAX, CR_ERROR_VALUE, CR_OK, G_chop(), G_color_values(), G_strcasecmp(), int, min, and value.
Referenced by G_read_color_rule().
const char* G_parse_color_rule_error | ( | int | code | ) |
Definition at line 104 of file color_rules.c.
References CR_ERROR_COLOR, CR_ERROR_PERCENT, CR_ERROR_RGB, CR_ERROR_SYNTAX, CR_ERROR_VALUE, and CR_OK.
Referenced by G_read_color_rule().
int G_read_color_rule | ( | void * | closure, |
DCELL | min, | ||
DCELL | max, | ||
DCELL * | val, | ||
int * | r, | ||
int * | g, | ||
int * | b, | ||
int * | norm, | ||
int * | nval, | ||
int * | dflt | ||
) |
Definition at line 124 of file color_rules.c.
References buf, G_debug(), G_fatal_error(), G_getl2(), G_parse_color_rule(), G_parse_color_rule_error(), and G_strip().
Referenced by G_read_color_rules().
int G_read_color_rules | ( | struct Colors * | colors, |
DCELL | min, | ||
DCELL | max, | ||
read_rule_fn * | read_rule, | ||
void * | closure | ||
) |
Definition at line 158 of file color_rules.c.
References b, rule::b, g, rule::g, G_add_d_raster_color_rule(), G_free(), G_init_colors(), G_read_color_rule(), G_set_d_color(), G_set_default_color(), G_set_null_value_color(), n, NULL, r, rule::r, rule::set, main::set, and rule::val.