summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vrhel <michael.vrhel@artifex.com>2016-08-24 07:49:53 -0700
committerMichael Vrhel <michael.vrhel@artifex.com>2016-08-24 07:52:01 -0700
commit8a8eefe5dcb1509aa5ebd7517438c755045bb139 (patch)
treeec448f6491453b488eb54b0685f5059f6f6fa87d
parentcc3192c4fddaccfe4d3199e944ae9a7b8edb5682 (diff)
downloadghostpdl-8a8eefe5dcb1509aa5ebd7517438c755045bb139.tar.gz
Bug 697059 Pattern and Spot Color
If the only occurrence of a spot color was in a pattern, the equivalent CMYK values were not getting set for use by a separation device during the installation of the separation color space. This was due to the fact that the pattern accumulator bits device (whose target is the real device) has its update_spot_equivalent_color proc set to default which ends up doing nothing. Instead we now set the bits device proc to forward to the real target device.
-rw-r--r--base/gxpcmap.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/base/gxpcmap.c b/base/gxpcmap.c
index 9d7cc56af..4206de48b 100644
--- a/base/gxpcmap.c
+++ b/base/gxpcmap.c
@@ -463,6 +463,12 @@ pattern_accum_open(gx_device * dev)
code = (*dev_proc(bits, open_device)) ((gx_device *) bits);
gx_device_set_target((gx_device_forward *)padev,
(gx_device *)bits);
+ /* The update_spot_equivalent_color proc for the bits device
+ should forward to the real target device. This will ensure
+ that the target device can get equivalent CMYK values for
+ spot colors if we are using a separation device and the spot
+ color occurs only in patterns on the page. */
+ bits->procs.update_spot_equivalent_colors = gx_forward_update_spot_equivalent_colors;
}
}
}
@@ -532,8 +538,8 @@ pattern_accum_close(gx_device * dev)
/* _hl_color */
static int
pattern_accum_fill_rectangle_hl_color(gx_device *dev, const gs_fixed_rect *rect,
- const gs_gstate *pgs,
- const gx_drawing_color *pdcolor,
+ const gs_gstate *pgs,
+ const gx_drawing_color *pdcolor,
const gx_clip_path *pcpath)
{
gx_device_pattern_accum *const padev = (gx_device_pattern_accum *) dev;
@@ -1232,7 +1238,7 @@ dump_raw_pattern(int height, int width, int n_chan, int depth,
fwrite(Buffer,1,max_bands*height*width,fid);
}
} else {
- /* Binary Data. Lets get to 8 bit for debugging. We have to
+ /* Binary Data. Lets get to 8 bit for debugging. We have to
worry about planar vs. chunky. Note this assumes 1 bit data
only. */
if (is_planar) {
@@ -1254,17 +1260,17 @@ dump_raw_pattern(int height, int width, int n_chan, int depth,
for (k = 0; k < width; k++) {
for (m = 0; m < max_bands; m++) {
/* index current byte */
- byte_number =
- (int) ceil((( (float) k * (float) max_bands +
+ byte_number =
+ (int) ceil((( (float) k * (float) max_bands +
(float) m + 1.0) / 8.0)) - 1;
/* get byte of interest */
- current_byte =
+ current_byte =
curr_ptr[j*(mdev->raster) + byte_number];
/* get bit position */
- bit_position =
+ bit_position =
7 - (k * max_bands + m - byte_number * 8);
/* extract and create byte */
- output_val =
+ output_val =
((current_byte >> bit_position) & 0x1) * 255;
fwrite(&output_val,1,1,fid);
}
@@ -1451,7 +1457,7 @@ gx_pattern_load(gx_device_color * pdc, const gs_gstate * pgs,
return code;
} else {
/* Not a clist, get PDF14 buffer information */
- code =
+ code =
pdf14_get_buffer_information(saved->device,
((gx_device_pattern_accum*)adev)->transbuff,
saved->memory,