[GRASS-SVN] r32731 - grass/trunk/lib/cairodriver

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Aug 12 19:59:51 EDT 2008


Author: glynn
Date: 2008-08-12 19:59:51 -0400 (Tue, 12 Aug 2008)
New Revision: 32731

Modified:
   grass/trunk/lib/cairodriver/Graph.c
   grass/trunk/lib/cairodriver/Poly.c
   grass/trunk/lib/cairodriver/Text.c
Log:
Remember to mark surface modified after drawing


Modified: grass/trunk/lib/cairodriver/Graph.c
===================================================================
--- grass/trunk/lib/cairodriver/Graph.c	2008-08-12 22:29:27 UTC (rev 32730)
+++ grass/trunk/lib/cairodriver/Graph.c	2008-08-12 23:59:51 UTC (rev 32731)
@@ -259,34 +259,28 @@
     case FTYPE_BMP:
     case FTYPE_PNG:
 	surface =
-	    (cairo_surface_t *) cairo_image_surface_create_for_data(grid,
-								    CAIRO_FORMAT_ARGB32,
-								    width,
-								    height,
-								    stride);
+	    (cairo_surface_t *) cairo_image_surface_create_for_data(
+		grid, CAIRO_FORMAT_ARGB32, width, height, stride);
 	break;
 #if CAIRO_HAS_PDF_SURFACE
     case FTYPE_PDF:
 	surface =
-	    (cairo_surface_t *) cairo_pdf_surface_create(file_name,
-							 (double)width,
-							 (double)height);
+	    (cairo_surface_t *) cairo_pdf_surface_create(
+		file_name, (double) width, (double) height);
 	break;
 #endif
 #if CAIRO_HAS_PS_SURFACE
     case FTYPE_PS:
 	surface =
-	    (cairo_surface_t *) cairo_ps_surface_create(file_name,
-							(double)width,
-							(double)height);
+	    (cairo_surface_t *) cairo_ps_surface_create(
+		file_name, (double) width, (double) height);
 	break;
 #endif
 #if CAIRO_HAS_SVG_SURFACE
     case FTYPE_SVG:
 	surface =
-	    (cairo_surface_t *) cairo_svg_surface_create(file_name,
-							 (double)width,
-							 (double)height);
+	    (cairo_surface_t *) cairo_svg_surface_create(
+		file_name, (double) width, (double) height);
 	break;
 #endif
     default:

Modified: grass/trunk/lib/cairodriver/Poly.c
===================================================================
--- grass/trunk/lib/cairodriver/Poly.c	2008-08-12 22:29:27 UTC (rev 32730)
+++ grass/trunk/lib/cairodriver/Poly.c	2008-08-12 23:59:51 UTC (rev 32731)
@@ -14,6 +14,7 @@
     G_debug(3, "Cairo_Polygon (%d points)", count);
     do_polygon(xarray, yarray, count);
     cairo_fill(cairo);
+    modified = 1;
 }
 
 void Cairo_Polyline(const double *xarray, const double *yarray, int count)
@@ -21,6 +22,7 @@
     G_debug(3, "Cairo_Polyline (%d points)", count);
     do_polygon(xarray, yarray, count);
     cairo_stroke(cairo);
+    modified = 1;
 }
 
 void Cairo_Polydots(const double *xarray, const double *yarray, int count)
@@ -30,5 +32,6 @@
     G_debug(3, "Cairo_Polydots (%d points)", count);
     for (i = 1; i < count; i++)
 	Cairo_draw_point(xarray[0], yarray[0]);
+    modified = 1;
 }
 

Modified: grass/trunk/lib/cairodriver/Text.c
===================================================================
--- grass/trunk/lib/cairodriver/Text.c	2008-08-12 22:29:27 UTC (rev 32730)
+++ grass/trunk/lib/cairodriver/Text.c	2008-08-12 23:59:51 UTC (rev 32731)
@@ -222,19 +222,6 @@
     encoding = G_store(enc);
 }
 
-void Cairo_text_size(double width, double height)
-{
-    text_size_x = width;
-    text_size_y = height;
-    matrix_valid = 0;
-}
-
-void Cairo_text_rotation(double angle)
-{
-    text_rotation = angle;
-    matrix_valid = 0;
-}
-
 static void font_list_toy(char ***list, int *count, int verbose)
 {
     char **fonts = *list;



More information about the grass-commit mailing list