2
\file lib/cairodriver/color.c
4
\brief GRASS cairo display driver - colors management
6
(C) 2007-2008 by Lars Ahlzen and the GRASS Development Team
8
This program is free software under the GNU General Public License
9
(>=v2). Read the file COPYING that comes with GRASS for details.
11
\author Lars Ahlzen <lars ahlzen.com> (original contibutor)
12
\author Glynn Clements
15
#include "cairodriver.h"
18
\brief Set source color (opaque)
20
This color will then be used for any subsequent drawing operation
21
until a new source pattern is set.
23
\param r red color value
24
\param g green color value
25
\param b blue color value
27
void Cairo_Color(int r, int g, int b)
29
G_debug(3, "Cairo_Color: %d,%d,%d", r, g, b);
31
cairo_set_source_rgba(cairo,
32
CAIROCOLOR(r), CAIROCOLOR(g), CAIROCOLOR(b), 1.0);
34
G_debug(3, "Set color to: %g %g %g",
35
CAIROCOLOR(r), CAIROCOLOR(g), CAIROCOLOR(b));