GRASS 8 Programmer's Manual 8.6.0dev(2026)-8843f13794
Loading...
Searching...
No Matches
color_init.c
Go to the documentation of this file.
1/*!
2 \file lib/raster/color_init.c
3
4 \brief Raster Library - Initialize Colors structure
5
6 SPDX-FileCopyrightText: 2001-2009 GRASS Development Team
7 SPDX-License-Identifier: GPL-2.0-or-later
8
9 \author Original author CERL
10 */
11
12#include <grass/gis.h>
13#include <grass/raster.h>
14
15/*!
16 \brief Initialize color structure
17
18 The <i>colors</i> structure is initialized for subsequent calls
19 to Rast_add_c_color_rule() and Rast_set_c_color().
20
21 \param colors pointer to Colors structure
22 */
23void Rast_init_colors(struct Colors *colors)
24{
25 G_zero(colors, sizeof(struct Colors));
26
27 colors->cmax = -1;
28 colors->fixed.max = -1;
29 colors->modular.max = -1;
30}
void Rast_init_colors(struct Colors *colors)
Initialize color structure.
Definition color_init.c:23
void G_zero(void *, int)
Zero out a buffer, buf, of length i.
Definition gis/zero.c:21
Definition gis.h:689
DCELL cmax
Definition gis.h:705
struct _Color_Info_ fixed
Definition gis.h:702
struct _Color_Info_ modular
Definition gis.h:703