From ce16458c7f99ccc9d4e7b64d4946cf5082738394 Mon Sep 17 00:00:00 2001 From: Michael Vrhel Date: Thu, 15 Sep 2022 12:56:45 -0700 Subject: Bug 705703 psdcmyktags device When doing separation or devicen fills, make sure that the tags plane gets set. --- base/gxcmap.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'base/gxcmap.c') diff --git a/base/gxcmap.c b/base/gxcmap.c index bdf83cba8..0c7bc7e12 100644 --- a/base/gxcmap.c +++ b/base/gxcmap.c @@ -1507,6 +1507,16 @@ cmap_separation_direct(frac all, gx_device_color * pdc, const gs_gstate * pgs, for (i = 0; i < ncomps; i++) pdc->colors.devn.values[i] = cv[i]; pdc->type = gx_dc_type_devn; + + /* Let device set the tags if present */ + if (device_encodes_tags(dev)) { + const gx_device *cmdev; + const gx_cm_color_map_procs *cmprocs; + + cmprocs = dev_proc(dev, get_color_mapping_procs)(dev, &cmdev); + cmprocs->map_cmyk(cmdev, 0, 0, 0, 0, cm_comps); + pdc->colors.devn.values[ncomps - 1] = frac2cv(cm_comps[ncomps - 1]); + } return; } @@ -1647,6 +1657,17 @@ cmap_devicen_direct(const frac * pcc, pdc->colors.devn.values[i] = frac2cv(frac_1 - gx_map_color_frac(pgs, (frac)(frac_1 - cm_comps[i]), effective_transfer[i])); pdc->type = gx_dc_type_devn; + + /* Let device set the tags if present */ + if (device_encodes_tags(dev)) { + const gx_device *cmdev; + const gx_cm_color_map_procs *cmprocs; + + cmprocs = dev_proc(dev, get_color_mapping_procs)(dev, &cmdev); + cmprocs->map_cmyk(cmdev, 0, 0, 0, 0, cm_comps); + pdc->colors.devn.values[ncomps - 1] = frac2cv(cm_comps[ncomps - 1]); + } + return; } -- cgit v1.2.1