GRASS 8 Programmer's Manual
8.6.0dev(2026)-8843f13794
Loading...
Searching...
No Matches
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
SPDX-FileCopyrightText: 2007-2008 Lars Ahlzen
7
SPDX-FileCopyrightText: GRASS Development Team
8
SPDX-License-Identifier: GPL-2.0-or-later
9
10
\author Lars Ahlzen <lars ahlzen.com> (original contributor)
11
\author Glynn Clements
12
*/
13
14
#include "
cairodriver.h
"
15
16
/*!
17
\brief Set source color (opaque)
18
19
This color will then be used for any subsequent drawing operation
20
until a new source pattern is set.
21
22
\param r red color value
23
\param g green color value
24
\param b blue color value
25
*/
26
void
Cairo_Color
(
int
r
,
int
g
,
int
b
)
27
{
28
G_debug
(3,
"Cairo_Color: %d,%d,%d"
,
r
,
g
,
b
);
29
30
cairo_set_source_rgba
(
cairo
,
CAIROCOLOR
(
r
),
CAIROCOLOR
(
g
),
CAIROCOLOR
(
b
),
31
1.0);
32
33
G_debug
(3,
"Set color to: %g %g %g"
,
CAIROCOLOR
(
r
),
CAIROCOLOR
(
g
),
34
CAIROCOLOR
(
b
));
35
}
Cairo_Color
void Cairo_Color(int r, int g, int b)
Set source color (opaque)
Definition
cairodriver/color.c:26
cairodriver.h
GRASS cairo display driver - header file.
CAIROCOLOR
#define CAIROCOLOR(a)
Definition
cairodriver.h:49
cairo
cairo_t * cairo
Definition
cairodriver/graph.c:45
AMI_STREAM
Definition
ami_stream.h:153
G_debug
int G_debug(int, const char *,...) __attribute__((format(printf
g
float g
Definition
named_colr.c:7
b
double b
Definition
r_raster.c:37
r
double r
Definition
r_raster.c:37
lib
cairodriver
color.c
Generated on Tue Sep 15 2026 06:57:38 for GRASS 8 Programmer's Manual by
1.9.8