GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
cairodriver/Draw_line.c
Go to the documentation of this file.
1 #include "cairodriver.h"
2 
3 void Cairo_draw_line(int x1, int y1, int x2, int y2)
4 {
5  G_debug(3, "Cairo_draw_line: %d %d %d %d", x1, y1, x2, y2);
6 
7  if (x1 == x2 && y1 == y2) {
8  /* don't draw degenerate lines */
9  G_debug(3, "Skipping zero-length line");
10  return;
11  }
12 
13  cairo_move_to(cairo, x1, y1);
14  cairo_line_to(cairo, x2, y2);
15  cairo_stroke(cairo);
16  modified = 1;
17 }
int modified
cairo_t * cairo
int G_debug(int level, const char *msg,...)
Print debugging message.
Definition: gis/debug.c:51
void Cairo_draw_line(int, int, int, int)