Loading...
Searching...
No Matches
cairodriver/draw.c
Go to the documentation of this file.
/*!
\file lib/cairodriver/draw.c
\brief GRASS cairo display driver
(C) 2007-2008 by Lars Ahlzen, Glynn Clements 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"
void Cairo_Begin(void)
{
cairo_new_path(cairo);
}
void Cairo_Move(double x, double y)
{
cairo_move_to(cairo, x, y);
}
void Cairo_Cont(double x, double y)
{
cairo_line_to(cairo, x, y);
}
void Cairo_Close(void)
{
cairo_close_path(cairo);
}
void Cairo_Stroke(void)
{
cairo_stroke(cairo);
ca.modified = 1;
}
void Cairo_Fill(void)
{
cairo_fill(cairo);
ca.modified = 1;
}
void Cairo_Point(double x, double y)
{
static double point_size = 1.0;
double half_point_size = point_size / 2;
cairo_new_path(cairo);
cairo_rectangle(cairo, x - half_point_size, y - half_point_size, point_size,
point_size);
cairo_fill(cairo);
ca.modified = 1;
}
Cairo_Begin
void Cairo_Begin(void)
Definition cairodriver/draw.c:17
Cairo_Close
void Cairo_Close(void)
Definition cairodriver/draw.c:32
Cairo_Stroke
void Cairo_Stroke(void)
Definition cairodriver/draw.c:37
Cairo_Cont
void Cairo_Cont(double x, double y)
Definition cairodriver/draw.c:27
Cairo_Fill
void Cairo_Fill(void)
Definition cairodriver/draw.c:43
Cairo_Move
void Cairo_Move(double x, double y)
Definition cairodriver/draw.c:22
Cairo_Point
void Cairo_Point(double x, double y)
Definition cairodriver/draw.c:49
cairodriver.h
GRASS cairo display driver - header file.
ca
struct cairo_state ca
Definition cairodriver/graph.c:42
cairo
cairo_t * cairo
Definition cairodriver/graph.c:46
x
#define x