GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
color_rules.c File Reference
#include <stdio.h>
#include <grass/gis.h>
#include <grass/glocale.h>
Include dependency graph for color_rules.c:

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)
 

Enumeration Type Documentation

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.

Function Documentation

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 
)
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)

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 
)
int G_read_color_rules ( struct Colors *  colors,
DCELL  min,
DCELL  max,
read_rule_fn *  read_rule,
void *  closure 
)