GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
cairodriver/color.c
Go to the documentation of this file.
1
/*!
2
\file lib/cairodriver/color.c
3
4
\brief GRASS cairo display driver - colors management
5
6
(C) 2007-2008 by Lars Ahlzen and the GRASS Development Team
7
8
This program is free software under the GNU General Public License
9
(>=v2). Read the file COPYING that comes with GRASS for details.
10
11
\author Lars Ahlzen <lars ahlzen.com> (original contibutor)
12
\author Glynn Clements
13
*/
14
15
#include "
cairodriver.h
"
16
17
/*!
18
\brief Set source color (opaque)
19
20
This color will then be used for any subsequent drawing operation
21
until a new source pattern is set.
22
23
\param r red color value
24
\param g green color value
25
\param b blue color value
26
*/
27
void
Cairo_Color
(
int
r
,
int
g
,
int
b
)
28
{
29
G_debug
(3,
"Cairo_Color: %d,%d,%d"
, r, g, b);
30
31
cairo_set_source_rgba(
cairo
,
32
CAIROCOLOR
(r),
CAIROCOLOR
(g),
CAIROCOLOR
(b), 1.0);
33
34
G_debug
(3,
"Set color to: %g %g %g"
,
35
CAIROCOLOR
(r),
CAIROCOLOR
(g),
CAIROCOLOR
(b));
36
}
CAIROCOLOR
#define CAIROCOLOR(a)
Definition:
cairodriver.h:49
b
double b
Definition:
r_raster.c:39
cairo
cairo_t * cairo
Definition:
cairodriver/graph.c:46
g
float g
Definition:
named_colr.c:8
cairodriver.h
GRASS cairo display driver - header file.
Cairo_Color
void Cairo_Color(int r, int g, int b)
Set source color (opaque)
Definition:
cairodriver/color.c:27
G_debug
int G_debug(int, const char *,...) __attribute__((format(printf
r
double r
Definition:
r_raster.c:39
lib
cairodriver
color.c
Generated on Mon May 31 2021 05:21:28 for GRASS GIS 7 Programmer's Manual by
1.8.13