2
/****************************************************************************
5
* AUTHOR(S): Glynn Clements <glynn@gclements.plus.com>
6
* COPYRIGHT: (C) 2007 Glynn Clements and the GRASS Development Team
8
* NOTE: Compatibility wrappers for G_make_*[_fp]_colors()
10
* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version.
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
20
*****************************************************************************/
22
#include <grass/gis.h>
26
* \brief make color wave
28
* Generates a color table with 3 sections: red only,
29
* green only, and blue only, each increasing from none to full intensity and
30
* back down to none. This table is good for continuous data like elevation.
38
int G_make_wave_colors(struct Colors *colors, CELL min, CELL max)
40
return G_make_colors(colors, "wave", min, max);
43
int G_make_wave_fp_colors(struct Colors *colors, DCELL min, DCELL max)
45
return G_make_fp_colors(colors, "wave", min, max);
49
int G_make_ryg_colors(struct Colors *colors, CELL min, CELL max)
51
return G_make_colors(colors, "ryg", min, max);
54
int G_make_ryg_fp_colors(struct Colors *colors, DCELL min, DCELL max)
56
return G_make_fp_colors(colors, "ryg", min, max);
60
* \brief make color ramp
62
* Generates a color table with 3 sections: red only,
63
* green only, and blue only, each increasing from none to full intensity. This
64
* table is good for continuous data, such as elevation.
72
int G_make_ramp_colors(struct Colors *colors, CELL min, CELL max)
74
return G_make_colors(colors, "ramp", min, max);
77
int G_make_ramp_fp_colors(struct Colors *colors, DCELL min, DCELL max)
79
return G_make_fp_colors(colors, "ramp", min, max);
83
* \brief make rainbow colors
85
* Generates a "shifted" rainbow color table - yellow
86
* to green to cyan to blue to magenta to red. The color table is based on
87
* rainbow colors. (Normal rainbow colors are red, orange, yellow, green, blue,
88
* indigo, and violet.) This table is good for continuous data, such as
97
int G_make_rainbow_colors(struct Colors *colors, CELL min, CELL max)
99
return G_make_colors(colors, "rainbow", min, max);
102
int G_make_rainbow_fp_colors(struct Colors *colors, DCELL min, DCELL max)
104
return G_make_fp_colors(colors, "rainbow", min, max);
108
int G_make_gyr_colors(struct Colors *colors, CELL min, CELL max)
110
return G_make_colors(colors, "gyr", min, max);
113
int G_make_gyr_fp_colors(struct Colors *colors, DCELL min, DCELL max)
115
return G_make_fp_colors(colors, "gyr", min, max);
119
* \brief make linear grey scale
121
* Generates a grey scale color table. Each color
122
* is a level of grey, increasing from black to white.
130
int G_make_grey_scale_colors(struct Colors *colors, CELL min, CELL max)
132
return G_make_colors(colors, "grey", min, max);
135
int G_make_grey_scale_fp_colors(struct Colors *colors, DCELL min, DCELL max)
137
return G_make_fp_colors(colors, "grey", min, max);
140
int G_make_byr_colors(struct Colors *colors, CELL min, CELL max)
142
return G_make_colors(colors, "byr", min, max);
145
int G_make_byr_fp_colors(struct Colors *colors, DCELL min, DCELL max)
147
return G_make_fp_colors(colors, "byr", min, max);
150
int G_make_bgyr_colors(struct Colors *colors, CELL min, CELL max)
152
return G_make_colors(colors, "bgyr", min, max);
155
int G_make_bgyr_fp_colors(struct Colors *colors, DCELL min, DCELL max)
157
return G_make_fp_colors(colors, "bgyr", min, max);
160
int G_make_byg_colors(struct Colors *colors, CELL min, CELL max)
162
return G_make_colors(colors, "byg", min, max);
165
int G_make_byg_fp_colors(struct Colors *colors, DCELL min, DCELL max)
167
return G_make_fp_colors(colors, "byg", min, max);
171
* \brief make aspect colors
173
* Generates a color table for aspect data.
181
int G_make_aspect_colors(struct Colors *colors, CELL min, CELL max)
183
return G_make_colors(colors, "aspect", min, max);
186
int G_make_aspect_fp_colors(struct Colors *colors, DCELL min, DCELL max)
188
return G_make_fp_colors(colors, "aspect", min, max);