GRASS GIS 7 Programmer's Manual  7.7.svn(2018)-r73574
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
gis/color_rules.c File Reference

GIS Library - Color tables management subroutines. More...

#include <stdlib.h>
#include <string.h>
#include <grass/gis.h>
#include <grass/glocale.h>
Include dependency graph for gis/color_rules.c:

Go to the source code of this file.

Functions

char * G_color_rules_options (void)
 Get list of color rules for Option->options. More...
 
char * G_color_rules_descriptions (void)
 Get color rules description for Option->descriptions. More...
 
char * G_color_rules_description_type (void)
 Get color rules description for Option->descriptions. More...
 
void G_list_color_rules (FILE *out)
 Print color rules. More...
 
void G_list_color_rules_description_type (FILE *out, char *name)
 Print color rules with description and type. More...
 
int G_find_color_rule (const char *name)
 Check if color rule is defined. More...
 

Detailed Description

GIS Library - Color tables management subroutines.

Taken from r.colors module.

(C) 2001-2011 by the GRASS Development Team

Definition in file gis/color_rules.c.

Function Documentation

char* G_color_rules_description_type ( void  )

Get color rules description for Option->descriptions.

The type of color rule including range is appended to the description

Returns
allocated buffer with name, description, and type

Definition at line 124 of file gis/color_rules.c.

References name.

Referenced by G_define_standard_option().

char* G_color_rules_descriptions ( void  )

Get color rules description for Option->descriptions.

Returns
allocated buffer with descriptions

Definition at line 79 of file gis/color_rules.c.

References _, and name.

char* G_color_rules_options ( void  )

Get list of color rules for Option->options.

Returns
allocated string buffer with options

Definition at line 40 of file gis/color_rules.c.

References list, name, and NULL.

Referenced by G_define_standard_option().

int G_find_color_rule ( const char *  name)

Check if color rule is defined.

Parameters
namecolor rule name
Returns
1 found
0 not found

Definition at line 247 of file gis/color_rules.c.

References NULL.

void G_list_color_rules ( FILE *  out)

Print color rules.

Parameters
outfile where to print

Definition at line 175 of file gis/color_rules.c.

References name.

void G_list_color_rules_description_type ( FILE *  out,
char *  name 
)

Print color rules with description and type.

The type of color rule including range is appended to the description. If a color rule name is given, color info is printed only for this rule.

Parameters
nameoptional color rule name, or NULL
outfile where to print

Definition at line 198 of file gis/color_rules.c.

References name, and NULL.