[gs-cvs] rev 9605 - trunk/ghostpdl/xps

tor at ghostscript.com tor at ghostscript.com
Tue Mar 31 06:13:09 PDT 2009


Author: tor
Date: 2009-03-31 06:13:07 -0700 (Tue, 31 Mar 2009)
New Revision: 9605

Modified:
   trunk/ghostpdl/xps/xpsopacity.c
Log:
The clip mask and path when emulating a non-solid brush fill was not gsave/grestore bracketed properly, causing funny behavior when combined with transparency masks. Solves bug 690358 and fixes FTS test 0202 among others.

Modified: trunk/ghostpdl/xps/xpsopacity.c
===================================================================
--- trunk/ghostpdl/xps/xpsopacity.c	2009-03-30 16:26:53 UTC (rev 9604)
+++ trunk/ghostpdl/xps/xpsopacity.c	2009-03-31 13:13:07 UTC (rev 9605)
@@ -36,11 +36,11 @@
 
     if (opacity_mask_tag)
     {
-	//dprintf1("begin opacity mask (%s)\n", xps_tag(opacity_mask_tag));
-
 	gs_trans_mask_params_init(&tmp, TRANSPARENCY_MASK_Luminosity);
 	gs_begin_transparency_mask(ctx->pgs, &tmp, &bbox, 0);
 
+	gs_gsave(ctx->pgs);
+
 	/* Need a path to fill/clip for the brush */
 	gs_moveto(ctx->pgs, bbox.p.x, bbox.p.y);
 	gs_lineto(ctx->pgs, bbox.p.x, bbox.q.y);
@@ -56,8 +56,8 @@
 	save = ctx->opacity_only;
 	ctx->opacity_only = 1;
 
-	gs_gsave(ctx->pgs);
 	xps_parse_brush(ctx, dict, opacity_mask_tag);
+
 	gs_grestore(ctx->pgs);
 
 	ctx->opacity_only = save;



More information about the gs-cvs mailing list