GRASS Programmer's Manual  6.4.2(2012)
cairodriver/Draw_line.c
Go to the documentation of this file.
00001 #include "cairodriver.h"
00002 
00003 void Cairo_draw_line(int x1, int y1, int x2, int y2)
00004 {
00005     G_debug(3, "Cairo_draw_line: %d %d %d %d", x1, y1, x2, y2);
00006 
00007     if (x1 == x2 && y1 == y2) {
00008         /* don't draw degenerate lines */
00009         G_debug(3, "Skipping zero-length line");
00010         return;
00011     }
00012 
00013     cairo_move_to(cairo, x1, y1);
00014     cairo_line_to(cairo, x2, y2);
00015     cairo_stroke(cairo);
00016     modified = 1;
00017 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines