diff options
author | Michael Vrhel <michael.vrhel@artifex.com> | 2015-03-13 09:20:39 -0700 |
---|---|---|
committer | Michael Vrhel <michael.vrhel@artifex.com> | 2015-03-13 09:20:39 -0700 |
commit | a16e39318467d8a802296bd34bbf0fab7f7809d5 (patch) | |
tree | 8a5f2b678623e08099b07f3efb06d2f6fa8ca915 | |
parent | 64e33af885e49b40c0ebc070ede50e86a8ed3bdb (diff) |
Fix for bug 695863 overprint while pattern color is active
If a pattern color space is present when a graphics state swap occurs, and
the overprint changes from on to off in the graphics state the overprint
compositor is not disabled. In Bug 695863 a DeviceN image fill follows such
a case and the fill is improperly performed with overprint enabled. With this
commit we disable the overprint compositor if overprint is off. If overprint
is not off, it is not clear how we should proceed, as the color space is
a factor in that set up and here the color space is a pattern.
-rw-r--r-- | gs/base/gspcolor.c | 13 | ||||
-rw-r--r-- | gs/base/lib.mak | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/gs/base/gspcolor.c b/gs/base/gspcolor.c index a86dd6c93..7574cc155 100644 --- a/gs/base/gspcolor.c +++ b/gs/base/gspcolor.c @@ -38,6 +38,7 @@ #include "gsimage.h" #include "gsiparm4.h" #include "stream.h" +#include "gsovrc.h" /* GC descriptors */ public_st_pattern_template(); @@ -266,10 +267,22 @@ gx_install_Pattern(gs_color_space * pcs, gs_state * pgs) /* * Set the overprint compositor for a Pattern color space. This does nothing; * for patterns the overprint compositor is set at set_device_color time. + * However, it is possible that this pattern color has nothing to do with what + * is about to happen (e.g. an image enumeration and fill). Hence, we should + * at least disable the overprint compositor if overprint is off. If overprint + * is not off, it is not clear how we should proceed, as the color space is + * a factor in that set up and here the color space is a pattern. */ static int gx_set_overprint_Pattern(const gs_color_space * pcs, gs_state * pgs) { + gs_overprint_params_t params; + + if (!pgs->overprint) { + params.retain_any_comps = false; + pgs->effective_overprint_mode = 0; + return gs_state_update_overprint(pgs, ¶ms); + } return 0; } diff --git a/gs/base/lib.mak b/gs/base/lib.mak index 48d748e59..433cbc497 100644 --- a/gs/base/lib.mak +++ b/gs/base/lib.mak @@ -2450,7 +2450,7 @@ $(GLOBJ)gspcolor.$(OBJ) : $(GLSRC)gspcolor.c $(AK) $(gx_h)\ $(gsimage_h) $(gsiparm4_h) $(gspath_h) $(gsrop_h) $(gsstruct_h) $(gsutil_h)\ $(gxarith_h) $(gxcolor2_h) $(gxcoord_h) $(gxclip2_h) $(gxcspace_h)\ $(gxdcolor_h) $(gxdevice_h) $(gxdevmem_h) $(gxfixed_h) $(gxmatrix_h)\ - $(gxpath_h) $(gxpcolor_h) $(gzstate_h) $(stream_h) $(MAKEDIRS) + $(gxpath_h) $(gxpcolor_h) $(gzstate_h) $(stream_h) $(gsovrc_h) $(MAKEDIRS) $(GLCC) $(GLO_)gspcolor.$(OBJ) $(C_) $(GLSRC)gspcolor.c $(GLOBJ)gsptype1.$(OBJ) : $(GLSRC)gsptype1.c $(AK)\ |