GRASS GIS 8 Programmer's Manual
8.5.0dev(2025)-060b32d572
Main Page
Related Pages
Data Structures
Data Structures
Class Hierarchy
Data Fields
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Related Functions
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Variables
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
x
y
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
r
s
t
u
v
w
y
Enumerations
a
c
d
e
h
i
j
l
m
n
o
p
r
s
t
v
y
Enumerator
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
y
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
▼
GRASS GIS 8 Programmer's Manual
Libraries
Core libraries
►
Further libraries
File structure of GRASS Location
►
Compiling and Installing GRASS Modules
Multiple-Architecture Conventions
►
Vector modules and their parameters/flags
►
GRASS Array Statistics Library
►
GRASS Btree2 and k-d tree libraries
►
GRASS Cairo Display Driver
►
GRASS testing normality & exponentiality Library
►
GRASS Cluster analysis statistics Library
►
GRASS DataBase Management Interface
►
GRASS Display Library
►
CCMATH mathematics library source code
►
GRASS GIS General Library (aka GIS Library)
►
GRASS Numerical math interface
►
GRASS Partial differential equations Library (GPDE)
►
GRASS Imagery Library
►
GRASS Data Elements Manage Library
►
GRASS Nviz Library
►
GRASS GIS OGSF Library
GRASS GIS PNG Display Driver Library
►
GRASS and the PROJ projection library
GRASS Postscript Display Driver Library
►
GRASS Raster Library
►
GRASS 3D Raster Volume Library
GRASS Row Input/Output Library
►
GRASS Library for interpolation with regularized splines with tension
►
GRASS Segment Library
►
GRASS Directed Graph Library
►
GRASS Vector Library
Todo List
Deprecated List
Bug List
►
Data Structures
▼
Files
►
File List
►
Globals
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
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 contributor)
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
,
CAIROCOLOR
(
r
),
CAIROCOLOR
(
g
),
CAIROCOLOR
(
b
),
32
1.0);
33
34
G_debug
(3,
"Set color to: %g %g %g"
,
CAIROCOLOR
(
r
),
CAIROCOLOR
(
g
),
35
CAIROCOLOR
(
b
));
36
}
Cairo_Color
void Cairo_Color(int r, int g, int b)
Set source color (opaque)
Definition:
cairodriver/color.c:27
cairodriver.h
GRASS cairo display driver - header file.
CAIROCOLOR
#define CAIROCOLOR(a)
Definition:
cairodriver.h:50
cairo
cairo_t * cairo
Definition:
cairodriver/graph.c:46
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:39
r
double r
Definition:
r_raster.c:39
lib
cairodriver
color.c
Generated on Sat Mar 15 2025 07:34:57 for GRASS GIS 8 Programmer's Manual by
1.9.1