GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-36359e2344
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.

Functions

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.

Author
Martin Landa <landa.martin gmail.com>

Definition in file vector/Vlib/color_read.c.

Function Documentation

◆ Vect_read_colors()

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.

Parameters
namevector map name
mapsetmapset name ("" for search path)
[out]colorspointer to Colors structure (can be NULL)
Returns
-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.