[gs-commits] rev 10844 - branches/gs_2_colors/base

robin at ghostscript.com robin at ghostscript.com
Wed Mar 3 16:27:01 UTC 2010


Author: robin
Date: 2010-03-03 16:27:00 +0000 (Wed, 03 Mar 2010)
New Revision: 10844

Modified:
   branches/gs_2_colors/base/gsstate.c
Log:
More fixes to gs_2_colors.

It's important that the overprint device is updated when colorspaces change,
not just when the overprint setting changes. To this end we relax two of the
"has overprint changed" tests in the code. I'm not entirely sure how this
ever worked in trunk gs, but presumably there must be something else at play.




Modified: branches/gs_2_colors/base/gsstate.c
===================================================================
--- branches/gs_2_colors/base/gsstate.c	2010-03-03 06:14:58 UTC (rev 10843)
+++ branches/gs_2_colors/base/gsstate.c	2010-03-03 16:27:00 UTC (rev 10844)
@@ -428,7 +428,7 @@
     gs_free_object(pgs->memory, saved, "gs_grestore");
 
     /* update the overprint compositor, if necessary */
-    if (prior_overprint != pgs->overprint)
+    if (prior_overprint || pgs->overprint)
     {
         return gs_do_set_overprint(pgs);
     }
@@ -1186,9 +1186,21 @@
 
     gs_swapcolors_quick(pgs);
 
-    if ((prior_overprint != pgs->overprint) ||
-        ((prior_mode != pgs->effective_overprint_mode) &&
-         (pgs->overprint)))
+    /* The following code will only call gs_do_set_overprint when we
+     * have a change:
+     * if ((prior_overprint != pgs->overprint) ||
+     *    ((prior_mode != pgs->effective_overprint_mode) &&
+     *     (pgs->overprint)))
+     *    return gs_do_set_overprint(pgs);
+     * Sadly, that's no good, as we need to call when we have swapped
+     * image space types too (separation <-> non separation for example).
+     *
+     * So instead, we call whenever at least one of them had overprint
+     * turned on.
+     */
+    if (prior_overprint || pgs->overprint)
+    {
         return gs_do_set_overprint(pgs);
+    }
     return 0;
 }



More information about the gs-commits mailing list