GRASS Programmer's Manual
6.4.2(2012)
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
color_set.c
Go to the documentation of this file.
1
#include <grass/gis.h>
2
3
/* for convenience, but to be avoided if possible */
4
28
int
G_set_color
(CELL cat,
int
r
,
int
g
,
int
b
,
struct
Colors *colors)
29
{
30
CELL tmp = cat;
31
32
if
(
G_is_c_null_value
(&tmp))
33
return
G_set_null_value_color
(r, g, b, colors);
34
return
G_add_color_rule
(cat, r, g, b, cat, r, g, b, colors);
35
}
36
37
int
G_set_d_color
(DCELL
val
,
int
r
,
int
g
,
int
b
,
struct
Colors *colors)
38
{
39
DCELL tmp =
val
;
40
41
if
(
G_is_d_null_value
(&tmp))
42
return
G_set_null_value_color
(r, g, b, colors);
43
return
G_add_d_raster_color_rule
(&val, r, g, b, &val, r, g, b, colors);
44
}
45
46
59
int
G_set_null_value_color
(
int
red,
int
grn,
int
blu,
struct
Colors *colors)
60
{
61
colors->null_red = red;
62
colors->null_grn = grn;
63
colors->null_blu = blu;
64
colors->null_set = 1;
65
return
1;
66
}
67
68
82
int
G_set_default_color
(
int
red,
int
grn,
int
blu,
struct
Colors *colors)
83
{
84
colors->undef_red = red;
85
colors->undef_grn = grn;
86
colors->undef_blu = blu;
87
colors->undef_set = 1;
88
return
1;
89
}
lib
gis
color_set.c
Generated on Wed Jun 6 2012 14:04:20 for GRASS Programmer's Manual by
1.8.1