summaryrefslogtreecommitdiff
path: root/pcl/pxl
diff options
context:
space:
mode:
authorHenry Stiles <henry.stiles@artifex.com>2019-02-03 14:44:02 -0700
committerHenry Stiles <henry.stiles@artifex.com>2019-02-04 09:25:32 -0700
commit0495abb3605831147f39691701030405b44cd5d0 (patch)
tree96f91f700a33471bda008bbb54ab85ea856a45c4 /pcl/pxl
parentcfc80a96f5ba682d86ce2ee1375cfca5b5941fea (diff)
downloadghostpdl-0495abb3605831147f39691701030405b44cd5d0.tar.gz
Fix 700565 - SetHalftoneMethod parsing is wrong.
The parameter numbering was off by one and the check for object type should not have exited the command. Also change the operator to not report missing attributes. This results in changes to error test files in the Quality Logic suite, however, we did not match the HP error report previously and don't plan to do so. Oddly, HP reports a C file and line number in the report, we suspect this is a bug.
Diffstat (limited to 'pcl/pxl')
-rw-r--r--pcl/pxl/pxink.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/pcl/pxl/pxink.c b/pcl/pxl/pxink.c
index 77266626f..f984a3e00 100644
--- a/pcl/pxl/pxink.c
+++ b/pcl/pxl/pxink.c
@@ -174,7 +174,7 @@ px_set_halftone(px_state_t * pxs)
/* width */ 16, /*height */ 16,
/* dither data */ thresh,
/* x phase */ (int)pxgs->halftone.origin.x,
- /* y phase */
+ /* y phase */
(int)pxgs->halftone.origin.y);
} else { /* downloaded */
int ht_width, ht_height;
@@ -201,7 +201,7 @@ px_set_halftone(px_state_t * pxs)
/* dither data */
pxgs->halftone.thresholds,
/* x phase */ (int)pxgs->halftone.origin.x,
- /* y phase */
+ /* y phase */
(int)pxgs->halftone.origin.y);
if (code < 0)
gs_free_string(pxs->memory, pxgs->halftone.thresholds.data,
@@ -873,9 +873,9 @@ pxSetHalftoneMethod(px_args_t * par, px_state_t * pxs)
px_gstate_t *pxgs = pxs->pxgs;
pxeDitherMatrix_t method;
- if (par->pv[6] || par->pv[7] || par->pv[8] || par->pv[9])
- /* ignore object type arguments */
- return 0;
+ if (par->pv[5] || par->pv[6] || par->pv[7] || par->pv[8])
+ /* Placeholder to support halftones per object type. */
+ ;
if (par->pv[1]) { /* Internal halftone */
if (par->pv[2] || par->pv[3] || par->pv[4])
@@ -961,7 +961,7 @@ pxSetHalftoneMethod(px_args_t * par, px_state_t * pxs)
pxgs->halftone.height = height;
method = eDownloaded;
} else
- return_error(errorMissingAttribute);
+ return 0;
if (par->pv[0])
gs_transform(pgs, real_value(par->pv[0], 0),
real_value(par->pv[0], 1), &pxgs->halftone.origin);