Loading...
Searching...
No Matches
cairodriver/color.c
Go to the documentation of this file.
/*!
\file lib/cairodriver/color.c
\brief GRASS cairo display driver - colors management
(C) 2007-2008 by Lars Ahlzen and the GRASS Development Team
This program is free software under the GNU General Public License
(>=v2). Read the file COPYING that comes with GRASS for details.
\author Lars Ahlzen <lars ahlzen.com> (original contributor)
\author Glynn Clements
*/
#include "cairodriver.h"
/*!
\brief Set source color (opaque)
This color will then be used for any subsequent drawing operation
until a new source pattern is set.
\param r red color value
\param g green color value
\param b blue color value
*/
void Cairo_Color(int r, int g, int b)
{
G_debug(3, "Cairo_Color: %d,%d,%d", r, g, b);
cairo_set_source_rgba(cairo, CAIROCOLOR(r), CAIROCOLOR(g), CAIROCOLOR(b),
1.0);
G_debug(3, "Set color to: %g %g %g", CAIROCOLOR(r), CAIROCOLOR(g),
CAIROCOLOR(b));
}
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 level, const char *msg,...)
Print debugging message.
Definition debug.c:66
b
double b
Definition driver/set_window.c:5
r
double r
Definition driver/set_window.c:5
g
float g
Definition named_colr.c:7