[cairo-commit] cairo/src cairo-gstate.c,1.128,1.129

Carl Worth commit at pdx.freedesktop.org
Thu May 12 11:02:38 PDT 2005


Committed by: cworth

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

Modified Files:
	cairo-gstate.c 
Log Message:

        * test/.cvsignore:
        * test/Makefile.am:
        * test/paint-with-alpha-ref.png:
        * test/paint-with-alpha.c: (draw), (main): Add new test for bug in
        cairo_paint_with_alpha not transforming the source.

        * src/cairo-gstate.c: (_cairo_gstate_mask): Use a transformed copy
        of the source just like we do in all the other calls to
        cairo_surface_composite. Fixes the bug tested by
        test/paint-with-alpha.


Index: cairo-gstate.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-gstate.c,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -d -r1.128 -r1.129
--- cairo-gstate.c	12 May 2005 15:04:22 -0000	1.128
+++ cairo-gstate.c	12 May 2005 18:02:35 -0000	1.129
@@ -883,6 +883,7 @@
 		    cairo_pattern_t *mask)
 {
     cairo_rectangle_t extents;
+    cairo_pattern_union_t pattern;
     cairo_surface_pattern_t intermediate_pattern;
     cairo_pattern_t *effective_mask;
     cairo_status_t status;
@@ -935,8 +936,11 @@
 	mask_x = mask_y = 0;
     }
 
+    _cairo_pattern_init_copy (&pattern.base, gstate->source);
+    _cairo_gstate_pattern_transform (gstate, &pattern.base);
+
     status = _cairo_surface_composite (gstate->operator,
-				       gstate->source,
+				       &pattern.base,
 				       effective_mask,
 				       gstate->surface,
 				       extents.x,          extents.y,




More information about the cairo-commit mailing list