[dia] Fix compile time error with cairo-1-10 and CAIRO_HAS_SCRIPT_SURFACE



commit fd120ba0176bc6b047adfe3dc7f2e389b60fdb93
Author: Hans Breuer <hans breuer org>
Date:   Fri Sep 10 15:43:51 2010 +0200

    Fix compile time error with cairo-1-10 and CAIRO_HAS_SCRIPT_SURFACE
    
    It wasn't such a good idea to rely on unstable API for a cairo
    backend which became official with cairo 1.10

 plug-ins/cairo/diacairo.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/plug-ins/cairo/diacairo.c b/plug-ins/cairo/diacairo.c
index 7cf0f4e..c346ac4 100644
--- a/plug-ins/cairo/diacairo.c
+++ b/plug-ins/cairo/diacairo.c
@@ -207,11 +207,11 @@ export_data(DiagramData *data, const gchar *filename,
     height = (data->extents.bottom - data->extents.top) * renderer->scale + 0.5;
     DIAG_NOTE(g_message ("CairoScript Surface %dx%d\n", (int)width, (int)height));
     {
-      cairo_script_context_t *csc = cairo_script_context_create (filename_crt);
-      cairo_script_context_set_mode (csc, CAIRO_SCRIPT_MODE_ASCII);
-      renderer->surface = cairo_script_surface_create(csc, CAIRO_CONTENT_COLOR_ALPHA,
+      cairo_device_t *csdev = cairo_script_create (filename_crt);
+      cairo_script_set_mode (csdev, CAIRO_SCRIPT_MODE_ASCII);
+      renderer->surface = cairo_script_surface_create(csdev, CAIRO_CONTENT_COLOR_ALPHA,
 						      width, height);
-      cairo_script_context_destroy (csc);
+      cairo_device_destroy (csdev);
     }
     break;
 #endif



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]