GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Poly.c
Go to the documentation of this file.
1 #include "cairodriver.h"
2 
3 void do_polygon(const int *xarray, const int *yarray, int count)
4 {
5  int i;
6 
7  cairo_move_to(cairo, xarray[0], yarray[0]);
8  for (i = 1; i < count; i++)
9  cairo_line_to(cairo, xarray[i], yarray[i]);
10 }
11 
12 void Cairo_Polygon_abs(const int *xarray, const int *yarray, int count)
13 {
14  G_debug(3, "Cairo_Polygon_abs (%d points)", count);
15  do_polygon(xarray, yarray, count);
16  cairo_fill(cairo);
17 }
18 
19 void Cairo_Polyline_abs(const int *xarray, const int *yarray, int count)
20 {
21  G_debug(3, "Cairo_Polyline_abs (%d points)", count);
22  do_polygon(xarray, yarray, count);
23  cairo_stroke(cairo);
24 }
void Cairo_Polygon_abs(const int *, const int *, int)
Definition: Poly.c:12
void do_polygon(const int *xarray, const int *yarray, int count)
Definition: Poly.c:3
void Cairo_Polyline_abs(const int *, const int *, int)
Definition: Poly.c:19
int count
cairo_t * cairo
int G_debug(int level, const char *msg,...)
Print debugging message.
Definition: gis/debug.c:51