123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190 |
- /****************************************************************************
- *
- * MODULE: gis library
- * AUTHOR(S): Glynn Clements <glynn@gclements.plus.com>
- * COPYRIGHT: (C) 2007 Glynn Clements and the GRASS Development Team
- *
- * NOTE: Compatibility wrappers for G_make_*[_fp]_colors()
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- *****************************************************************************/
- #include <grass/gis.h>
- /*!
- * \brief make color wave
- *
- * Generates a color table with 3 sections: red only,
- * green only, and blue only, each increasing from none to full intensity and
- * back down to none. This table is good for continuous data like elevation.
- *
- * \param colors
- * \param min
- * \param max
- * \return
- */
- void G_make_wave_colors(struct Colors *colors, CELL min, CELL max)
- {
- G_make_colors(colors, "wave", min, max);
- }
- void G_make_wave_fp_colors(struct Colors *colors, DCELL min, DCELL max)
- {
- G_make_fp_colors(colors, "wave", min, max);
- }
- void G_make_ryg_colors(struct Colors *colors, CELL min, CELL max)
- {
- G_make_colors(colors, "ryg", min, max);
- }
- void G_make_ryg_fp_colors(struct Colors *colors, DCELL min, DCELL max)
- {
- G_make_fp_colors(colors, "ryg", min, max);
- }
- /*!
- * \brief make color ramp
- *
- * Generates a color table with 3 sections: red only,
- * green only, and blue only, each increasing from none to full intensity. This
- * table is good for continuous data, such as elevation.
- *
- * \param colors
- * \param min
- * \param max
- * \return
- */
- void G_make_ramp_colors(struct Colors *colors, CELL min, CELL max)
- {
- G_make_colors(colors, "ramp", min, max);
- }
- void G_make_ramp_fp_colors(struct Colors *colors, DCELL min, DCELL max)
- {
- G_make_fp_colors(colors, "ramp", min, max);
- }
- /*!
- * \brief make rainbow colors
- *
- * Generates a "shifted" rainbow color table - yellow
- * to green to cyan to blue to magenta to red. The color table is based on
- * rainbow colors. (Normal rainbow colors are red, orange, yellow, green, blue,
- * indigo, and violet.) This table is good for continuous data, such as
- * elevation.
- *
- * \param colors
- * \param min
- * \param max
- * \return
- */
- void G_make_rainbow_colors(struct Colors *colors, CELL min, CELL max)
- {
- G_make_colors(colors, "rainbow", min, max);
- }
- void G_make_rainbow_fp_colors(struct Colors *colors, DCELL min, DCELL max)
- {
- G_make_fp_colors(colors, "rainbow", min, max);
- }
- void G_make_gyr_colors(struct Colors *colors, CELL min, CELL max)
- {
- G_make_colors(colors, "gyr", min, max);
- }
- void G_make_gyr_fp_colors(struct Colors *colors, DCELL min, DCELL max)
- {
- G_make_fp_colors(colors, "gyr", min, max);
- }
- /*!
- * \brief make linear grey scale
- *
- * Generates a grey scale color table. Each color
- * is a level of grey, increasing from black to white.
- *
- * \param colors
- * \param min
- * \param max
- * \return
- */
- void G_make_grey_scale_colors(struct Colors *colors, CELL min, CELL max)
- {
- G_make_colors(colors, "grey", min, max);
- }
- void G_make_grey_scale_fp_colors(struct Colors *colors, DCELL min, DCELL max)
- {
- G_make_fp_colors(colors, "grey", min, max);
- }
- void G_make_byr_colors(struct Colors *colors, CELL min, CELL max)
- {
- G_make_colors(colors, "byr", min, max);
- }
- void G_make_byr_fp_colors(struct Colors *colors, DCELL min, DCELL max)
- {
- G_make_fp_colors(colors, "byr", min, max);
- }
- void G_make_bgyr_colors(struct Colors *colors, CELL min, CELL max)
- {
- G_make_colors(colors, "bgyr", min, max);
- }
- void G_make_bgyr_fp_colors(struct Colors *colors, DCELL min, DCELL max)
- {
- G_make_fp_colors(colors, "bgyr", min, max);
- }
- void G_make_byg_colors(struct Colors *colors, CELL min, CELL max)
- {
- G_make_colors(colors, "byg", min, max);
- }
- void G_make_byg_fp_colors(struct Colors *colors, DCELL min, DCELL max)
- {
- G_make_fp_colors(colors, "byg", min, max);
- }
- /*!
- * \brief make aspect colors
- *
- * Generates a color table for aspect data.
- *
- * \param colors
- * \param min
- * \param max
- * \return
- */
- void G_make_aspect_colors(struct Colors *colors, CELL min, CELL max)
- {
- G_make_colors(colors, "aspect", min, max);
- }
- void G_make_aspect_fp_colors(struct Colors *colors, DCELL min, DCELL max)
- {
- G_make_fp_colors(colors, "aspect", min, max);
- }
|