[gs-cvs] rev 8885 - trunk/gs/src

leonardo at ghostscript.com leonardo at ghostscript.com
Sun Jul 27 14:06:39 PDT 2008


Author: leonardo
Date: 2008-07-27 14:06:38 -0700 (Sun, 27 Jul 2008)
New Revision: 8885

Modified:
   trunk/gs/src/gxfill.c
Log:
Fix (shading) : Empty clipping was entirely lost.

DETAILS :

Bug 689982 "A wrong shading raster".

The old code doesn't account that gx_cpath_from_rectangle
may normalize the given rectangle.

EXPECTED DIFFERENCES :

None.


Modified: trunk/gs/src/gxfill.c
===================================================================
--- trunk/gs/src/gxfill.c	2008-07-27 19:10:02 UTC (rev 8884)
+++ trunk/gs/src/gxfill.c	2008-07-27 21:06:38 UTC (rev 8885)
@@ -614,6 +614,8 @@
 	    else
 		(*dev_proc(pdev, get_clipping_box)) (pdev, &clip_box);
 	    rect_intersect(clip_box, shading_rect);
+	    if (clip_box.p.x > clip_box.q.x || clip_box.p.y > clip_box.q.y)
+		return 0; /* Empty clipping, must not pass to gx_cpath_from_rectangle. */
 	    gx_cpath_init_local(&cpath_intersection, pdev->memory);
 	    code = gx_cpath_from_rectangle(&cpath_intersection, &clip_box);
 	} else if (pcpath != NULL) {



More information about the gs-cvs mailing list