[dia] Adapt to cairo_script_*() API changes (cairo-1.9.5)



commit 9073c91e816ac6eee5456fb9b6110d816a6ffb60
Author: Hans Breuer <hans breuer org>
Date:   Sat Nov 7 16:27:39 2009 +0100

    Adapt to cairo_script_*() API changes (cairo-1.9.5)
    
    Hope it is stable now, but only people configuring unstable cairo
    with --enable-script are affected.

 plug-ins/cairo/diacairo.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/plug-ins/cairo/diacairo.c b/plug-ins/cairo/diacairo.c
index 1995425..b01087b 100644
--- a/plug-ins/cairo/diacairo.c
+++ b/plug-ins/cairo/diacairo.c
@@ -206,9 +206,13 @@ export_data(DiagramData *data, const gchar *filename,
     width  = (data->extents.right - data->extents.left) * renderer->scale + 0.5;
     height = (data->extents.bottom - data->extents.top) * renderer->scale + 0.5;
     DIAG_NOTE(g_message ("CairoScript Surface %dx%d\n", (int)width, (int)height));
-    renderer->surface = cairo_script_surface_create(filename_crt,
-						    width, height);
-    cairo_script_surface_set_mode(renderer->surface, CAIRO_SCRIPT_MODE_ASCII);
+    {
+      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,
+						      width, height);
+      cairo_script_context_destroy (csc);
+    }
     break;
 #endif
   /* finally cairo can render to MetaFiles */



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