#include <string.h>
#include <grass/gis.h>
#include <grass/colors.h>
Go to the source code of this file.
Functions | |
int | G_num_standard_colors (void) |
Get number of named colors (RGB triplets). | |
struct color_rgb | G_standard_color_rgb (int n) |
Get RGB triplet of given color. | |
int | G_num_standard_color_names (void) |
Get number of named colors (color names). | |
struct color_name * | G_standard_color_name (int n) |
Get color name. | |
int | G_str_to_color (const char *str, int *red, int *grn, int *blu) |
Parse color string and set red,green,blue. |
(C) 2001-2008 by the GRASS Development Team
This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file color_str.c.
int G_num_standard_color_names | ( | void | ) |
Get number of named colors (color names).
Definition at line 85 of file color_str.c.
Referenced by G_str_to_color().
int G_num_standard_colors | ( | void | ) |
Get number of named colors (RGB triplets).
Definition at line 65 of file color_str.c.
struct color_name* G_standard_color_name | ( | int | n | ) | [read] |
struct color_rgb G_standard_color_rgb | ( | int | n | ) | [read] |
Get RGB triplet of given color.
n | color index |
Definition at line 75 of file color_str.c.
int G_str_to_color | ( | const char * | str, | |
int * | red, | |||
int * | grn, | |||
int * | blu | |||
) |
Parse color string and set red,green,blue.
str | color string | |
[out] | red | red value |
[out] | grn | green value |
[out] | blu | blue value |
2 NONE
0 on error
Definition at line 112 of file color_str.c.
References G_chop(), G_debug(), G_num_standard_color_names(), G_strcasecmp(), G_strcpy(), and name.
Referenced by G_make_histogram_eq_colors(), and G_make_histogram_log_colors().