[cairo-commit] libsvg-cairo/src svg_cairo.c,1.41,1.42

Carl Worth commit at pdx.freedesktop.org
Wed Jul 27 10:23:11 PDT 2005


Committed by: cworth

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

Modified Files:
	svg_cairo.c 
Log Message:

        * src/svg_cairo.c: (_svg_cairo_set_gradient): Fix bug so that
        object opacity gets multiplied into the gradient as well.

        * src/svg_cairo.c: (_svg_cairo_set_color_and_alpha),
        (_svg_cairo_set_paint_and_opacity): Move multiplication of object
        opacity down from _svg_cairo_set_paint_and_opacity to
        _svg_cairo_set_color_and_alpha in order to be consistent with
        _svg_cairo_set_gradient.


Index: svg_cairo.c
===================================================================
RCS file: /cvs/cairo/libsvg-cairo/src/svg_cairo.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- svg_cairo.c	19 Jul 2005 16:57:17 -0000	1.41
+++ svg_cairo.c	27 Jul 2005 17:23:09 -0000	1.42
@@ -543,7 +543,7 @@
 			   svg_color_get_red   (color) / 255.0,
 			   svg_color_get_green (color) / 255.0,
 			   svg_color_get_blue  (color) / 255.0,
-			   alpha);
+			   svg_cairo->state->opacity * alpha);
 
     return _cairo_status_to_svg_status (cairo_status (svg_cairo->cr));
 }
@@ -611,7 +611,7 @@
 					   svg_color_get_red (&stop->color) / 255.0,
 					   svg_color_get_green (&stop->color) / 255.0,
 					   svg_color_get_blue (&stop->color) / 255.0,
-					   stop->opacity);
+					   svg_cairo->state->opacity * stop->opacity);
     }
 	    
     switch (gradient->spread) {
@@ -712,8 +712,6 @@
 {
     svg_status_t status;
 
-    opacity *= svg_cairo->state->opacity;
-    
     switch (paint->type) {
     case SVG_PAINT_TYPE_NONE:
 	break;




More information about the cairo-commit mailing list