summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gs/base/gspcolor.c13
-rw-r--r--gs/base/lib.mak2
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, &params);
+ }
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)\