GRASS Programmer's Manual  6.4.2(2012)
cairodriver/Line_width.c
Go to the documentation of this file.
00001 #include "cairodriver.h"
00002 
00003 #define MIN_WIDTH 1
00004 
00005 #ifndef MAX
00006 #define MAX(a,b) ((a)>(b)?(a):(b))
00007 #endif
00008 
00009 static int previous_width = -1;
00010 
00011 void Cairo_Line_width(int width)
00012 {
00013     G_debug(1, "Cairo_Line_width: %d", width);
00014 
00015     width = MAX(MIN_WIDTH, width);
00016     if (width != previous_width)
00017         cairo_set_line_width(cairo, (double)width);
00018 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines