[cairo-commit] libsvg-cairo/src svg_cairo.c,1.29,1.30

Carl Worth commit at pdx.freedesktop.org
Fri Jan 14 13:36:19 PST 2005


Committed by: cworth

Update of /cvs/cairo/libsvg-cairo/src
In directory gabe:/tmp/cvs-serv30163/src

Modified Files:
	svg_cairo.c 
Log Message:

        * src/svg_cairo.c (_svg_cairo_begin_group, _svg_cairo_end_group):
        Fix to use state->viewport_width/height so that large pieces of
        the drawing aren't just ignored. Thanks to TOKUNAGA Hiroyuki
        <tkng at xem.jp>.


Index: svg_cairo.c
===================================================================
RCS file: /cvs/cairo/libsvg-cairo/src/svg_cairo.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- svg_cairo.c	2 Aug 2004 20:16:37 -0000	1.29
+++ svg_cairo.c	14 Jan 2005 21:36:17 -0000	1.30
@@ -256,6 +256,8 @@
 
     (*svg_cairo)->cr = NULL;
     (*svg_cairo)->state = NULL;
+    /* XXX: These arbitrary constants don't belong. The viewport
+     * handling should be reworked. */
     (*svg_cairo)->viewport_width = 450;
     (*svg_cairo)->viewport_height = 450;
  
@@ -376,8 +378,8 @@
     if (opacity != 1.0) {
 	svg_cairo->state->child_surface = cairo_surface_create_similar (cairo_current_target_surface (svg_cairo->cr),
 							    CAIRO_FORMAT_ARGB32,
-							    svg_cairo->viewport_width,
-							    svg_cairo->viewport_height);
+							    svg_cairo->state->viewport_width,
+							    svg_cairo->state->viewport_height);
 	cairo_set_target_surface (svg_cairo->cr, svg_cairo->state->child_surface);
     }
 
@@ -431,7 +433,7 @@
 	cairo_default_matrix (svg_cairo->cr);
 	cairo_set_alpha (svg_cairo->cr, opacity);
 	cairo_show_surface (svg_cairo->cr, svg_cairo->state->child_surface,
-		       svg_cairo->viewport_width, svg_cairo->viewport_height);
+		       svg_cairo->state->viewport_width, svg_cairo->state->viewport_height);
 	cairo_restore (svg_cairo->cr);
 	cairo_surface_destroy (svg_cairo->state->child_surface);
 	svg_cairo->state->child_surface = NULL;




More information about the cairo-commit mailing list