summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vrhel <michael.vrhel@artifex.com>2019-12-18 21:08:27 -0800
committerMichael Vrhel <michael.vrhel@artifex.com>2020-01-10 09:37:31 -0800
commit93629c1e85cc236d9c0073b73f2727dffab4b8fb (patch)
tree16e7f1f560be8461dc55b41b517698ab49a3ff56
parenta7521b4cba8107133f65c2521f6a1a52a402df60 (diff)
downloadghostpdl-93629c1e85cc236d9c0073b73f2727dffab4b8fb.tar.gz
Fix logic on retain_any_comps computation
-rw-r--r--base/gscdevn.c6
-rw-r--r--base/gscsepr.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/base/gscdevn.c b/base/gscdevn.c
index 18ea7d6ef..56c568fbf 100644
--- a/base/gscdevn.c
+++ b/base/gscdevn.c
@@ -738,7 +738,11 @@ gx_set_overprint_DeviceN(const gs_color_space * pcs, gs_gstate * pgs)
} else {
gs_overprint_params_t params;
- if ((params.retain_any_comps = (pgs->overprint || pgs->stroke_overprint))) {
+
+ params.retain_any_comps = (pgs->overprint && pgs->is_fill_color) ||
+ (pgs->stroke_overprint && !pgs->is_fill_color);
+
+ if (params.retain_any_comps) {
int i, ncomps = pcs->params.device_n.num_components;
params.is_fill_color = pgs->is_fill_color; /* for fill_stroke */
diff --git a/base/gscsepr.c b/base/gscsepr.c
index 09317e4c9..70f36d667 100644
--- a/base/gscsepr.c
+++ b/base/gscsepr.c
@@ -190,9 +190,9 @@ gx_set_overprint_Separation(const gs_color_space * pcs, gs_gstate * pgs)
else {
gs_overprint_params_t params;
- /* We should not have to blend if we don't need the alternate tint transform */
- params.retain_any_comps = (pgs->overprint || pgs->stroke_overprint) &&
- pcs->params.separation.sep_type != SEP_ALL;
+ params.retain_any_comps = (((pgs->overprint && pgs->is_fill_color) ||
+ (pgs->stroke_overprint && !pgs->is_fill_color)) &&
+ (pcs->params.separation.sep_type != SEP_ALL));
params.is_fill_color = pgs->is_fill_color;
params.drawn_comps = 0;
params.op_state = OP_STATE_NONE;