GRASS Programmer's Manual  6.4.3(2013)-r
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
cairodriver/Line_width.c
Go to the documentation of this file.
1 #include "cairodriver.h"
2 
3 #define MIN_WIDTH 1
4 
5 #ifndef MAX
6 #define MAX(a,b) ((a)>(b)?(a):(b))
7 #endif
8 
9 static int previous_width = -1;
10 
12 {
13  G_debug(1, "Cairo_Line_width: %d", width);
14 
15  width = MAX(MIN_WIDTH, width);
16  if (width != previous_width)
17  cairo_set_line_width(cairo, (double)width);
18 }