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

leonardo at ghostscript.com leonardo at ghostscript.com
Mon Nov 6 10:58:57 PST 2006


Author: leonardo
Date: 2006-11-06 10:58:56 -0800 (Mon, 06 Nov 2006)
New Revision: 7166

Modified:
   trunk/gs/src/gsfunc3.c
   trunk/gs/src/gxshade6.c
Log:
Fix (shadings) : The monotonoty check for Stitching function was wrong.

DETAILS :

It partially fixes 09-47D.PS and other tests.

1. The function itself didn't set the non-monotonic dimension mask.
2. The shading code erroneusely exchanged dimensions when checking the color monotonoty.

EXPECTED DIFFERENCES :

"442-01.ps" 
"464-01-fixed.ps" 
"483-01.ps" 
"chilis_black.pdf" 
"Clarke Tate Manns Chinese.ai" 
"self-intersect2.ps" 
"STEUER-RollingMesh 1(linear).ai" 
"STEUER-RollingMesh 2(radial).ai" 
"STEUER-RollingMesh 3(Final).ai" 


Modified: trunk/gs/src/gsfunc3.c
===================================================================
--- trunk/gs/src/gsfunc3.c	2006-11-06 12:33:12 UTC (rev 7165)
+++ trunk/gs/src/gsfunc3.c	2006-11-06 18:58:56 UTC (rev 7166)
@@ -362,8 +362,10 @@
 	    vv1 = b1; /* Ignore a small noise */
 	if (vv0 == vv1)
 	    return 1;
-	if (vv0 < b1 && vv1 > b1)
-	    return 0; /* Consider stitches as monotonity beraks. */
+	if (vv0 < b1 && vv1 > b1) {
+	    *mask = 1;
+	    return 0; /* Consider stitches as monotonity breaks. */
+	}
 	e0 = pfn->params.Encode[2 * i];
 	e1 = pfn->params.Encode[2 * i + 1];
 	esmall = (float)1e-6 * any_abs(e1 - e0);

Modified: trunk/gs/src/gxshade6.c
===================================================================
--- trunk/gs/src/gxshade6.c	2006-11-06 12:33:12 UTC (rev 7165)
+++ trunk/gs/src/gxshade6.c	2006-11-06 18:58:56 UTC (rev 7166)
@@ -2237,9 +2237,9 @@
     if (code <= 0)
 	return code;
     if (code & 1)
+	*not_monotonic_by_u = true;
+    if (code & 2)
 	*not_monotonic_by_v = true;
-    if (code & 2)
-	*not_monotonic_by_u = true;
     return !code;
 }
 



More information about the gs-cvs mailing list