فهرست منبع

Remember to mark surface modified after drawing

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@32731 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 17 سال پیش
والد
کامیت
7e8f90ba9d
3فایلهای تغییر یافته به همراه11 افزوده شده و 27 حذف شده
  1. 8 14
      lib/cairodriver/Graph.c
  2. 3 0
      lib/cairodriver/Poly.c
  3. 0 13
      lib/cairodriver/Text.c

+ 8 - 14
lib/cairodriver/Graph.c

@@ -259,34 +259,28 @@ static void init_cairo(void)
     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:

+ 3 - 0
lib/cairodriver/Poly.c

@@ -14,6 +14,7 @@ void Cairo_Polygon(const double *xarray, const double *yarray, int count)
     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 @@ void Cairo_Polyline(const double *xarray, const double *yarray, int count)
     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 @@ void Cairo_Polydots(const double *xarray, const double *yarray, int count)
     G_debug(3, "Cairo_Polydots (%d points)", count);
     for (i = 1; i < count; i++)
 	Cairo_draw_point(xarray[0], yarray[0]);
+    modified = 1;
 }
 

+ 0 - 13
lib/cairodriver/Text.c

@@ -222,19 +222,6 @@ void Cairo_set_encoding(const char *enc)
     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;