Hi,

I've just commited in CVS a new cairo renderer for graphs.

It's an option at configure time. Just pass --with-cairo to ./configure.

If you want to test this renderer with gnumeric, you need to apply
attached patch to gnumeric source tree.

Without this patch, graphs don't display in sheet views, only in graph
guru.

        Emmanuel.
? plugins/perl/Makefile
? plugins/perl/Makefile.in
? plugins/perl/ext/Makefile.PL
? plugins/xml_sax/Makefile
? plugins/xml_sax/Makefile.in
? plugins/xml_sax/plugin.xml
? src/gnumeric-paths.sh
? templates/autoformat/st
Index: src/sheet-object-graph.c
===================================================================
RCS file: /cvs/gnome/gnumeric/src/sheet-object-graph.c,v
retrieving revision 1.63
diff -u -p -r1.63 sheet-object-graph.c
--- src/sheet-object-graph.c	1 May 2005 20:10:21 -0000	1.63
+++ src/sheet-object-graph.c	21 Jun 2005 15:41:10 -0000
@@ -43,7 +43,7 @@
 #include <goffice/graph/gog-object-xml.h>
 #include <goffice/graph/gog-data-allocator.h>
 #include <goffice/graph/gog-renderer-gnome-print.h>
-#include <goffice/graph/gog-renderer-pixbuf.h>
+#include <goffice/graph/gog-renderer-cairo.h>
 #include <goffice/graph/gog-renderer-svg.h>
 #include <goffice/graph/gog-control-foocanvas.h>
 #include <goffice/utils/go-file.h>
@@ -235,12 +235,12 @@ sheet_object_graph_write_image (SheetObj
 	if (strcmp (format, "svg") == 0) {
 		res = gog_graph_export_to_svg (sog->graph, output, w, h, 1.0);
 	} else {
-		GogRendererPixbuf *prend = GOG_RENDERER_PIXBUF (sog->renderer);
-		GdkPixbuf *pixbuf = gog_renderer_pixbuf_get (prend);
+		GogRendererCairo *prend = GOG_RENDERER_CAIRO (sog->renderer);
+		GdkPixbuf *pixbuf = gog_renderer_cairo_get_pixbuf (prend);
 
 		if (!pixbuf) {
-			gog_renderer_pixbuf_update (prend, w, h, 1.);
-			pixbuf = gog_renderer_pixbuf_get (prend);
+			gog_renderer_cairo_update (prend, w, h, 1.);
+			pixbuf = gog_renderer_cairo_get_pixbuf (prend);
 		}
 		res = gdk_pixbuf_save_to_callback (pixbuf,
 						   sog_gsf_gdk_pixbuf_save,
@@ -559,7 +559,7 @@ sheet_object_graph_set_gog (SheetObject 
 	if (sog->renderer != NULL)
 		g_object_set (sog->renderer, "model", graph, NULL);
 	else
-		sog->renderer = g_object_new (GOG_RENDERER_PIXBUF_TYPE,
+		sog->renderer = g_object_new (GOG_RENDERER_CAIRO_TYPE,
 					      "model", sog->graph,
 					      NULL);
 }
_______________________________________________
gnumeric-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gnumeric-list

Reply via email to