GRASS GIS 7 Programmer's Manual  7.5.svn(2017)-r71806
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vector/Vlib/color_read.c File Reference

Vector Library - read color table of vector map. More...

#include <string.h>
#include <grass/gis.h>
#include <grass/raster.h>
#include <grass/vector.h>
#include <grass/glocale.h>
Include dependency graph for vector/Vlib/color_read.c:

Go to the source code of this file.


int Vect_read_colors (const char *name, const char *mapset, struct Colors *colors)
 Read color table of vector map. More...

Detailed Description

Vector Library - read color table of vector map.

(C) 2011 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.

Martin Landa <landa.martin>

Definition in file vector/Vlib/color_read.c.

Function Documentation

int Vect_read_colors ( const char *  name,
const char *  mapset,
struct Colors colors 

Read color table of vector map.

The color table for the vector map name in the specified mapset is read into the colors structure.

Note: If a secondary color file for map name name exists in the current mapset, that color file is read. This allows the user to define their own color lookup tables for vector maps found in other mapsets.

Warning message is printed if the color file is missing or invalid.

namevector map name
mapsetmapset name ("" for search path)
[out]colorspointer to Colors structure (can be NULL)
-1 on error
0 if color table missing
1 on success (color table found)

Definition at line 42 of file vector/Vlib/color_read.c.

References G_find_vector(), G_mapset(), GNAME_MAX, GPATH_MAX, GV_COLR2_DIRECTORY, GV_COLR_ELEMENT, GV_DIRECTORY, Rast__read_colors(), and Rast_init_colors().