diff options
author | Ray Johnston <ray.johnston@artifex.com> | 2021-03-16 18:00:13 -0700 |
---|---|---|
committer | Ray Johnston <ray.johnston@artifex.com> | 2021-05-03 08:43:18 -0700 |
commit | 032cb22e6d63e2e81b86ae6ba1cbd04d7798bae7 (patch) | |
tree | 384383fb28c5e38380019437c026087ac99d2196 /pcl/pl | |
parent | 2b5118c3fcb8e5cc58c9a3d87ad9fe327eece117 (diff) | |
download | ghostpdl-032cb22e6d63e2e81b86ae6ba1cbd04d7798bae7.tar.gz |
Add object type specific device halftones to the graphics state.
PostScript 'sethalftone' has an optional parameter "ObjectType" that allows
one of the three object specific types to be set: Vector, Image or Text.
Also add a new PostScript operator to set the current halftone (dev_ht,
set by sethalftone) as the device halftone to be used for an object type:
path, image and text.
For non-PostScript clients, the gs_halftone structure adds a 'objtype'
element (enum) that can be set prior to calling gs_sethalftone.
The gs_gstate_s dev_ht is now an array of HT_OBJTYPE_COUNT elements,
indexed by the gs_HT_objtype_t enum, with HT_OBJTYPE_DEFAULT (value 0)
used for prior sethalftone/setscreen/setcolorscreen operations.
NOTE: adding object types beyond the default+3 entries will require modification
of gx_select_dev_ht since it only uses 3 bits of the 'tag' to get the index
for the dev_ht[] array.
For code style, change to use != NULL instead of != 0 in most places that
this commit touched (but we may want a general cleanup of this everywhere).
TBD: Command line options for all PDL's will need a method to take a
halftone specification -- most likely a file that may be "PS-lite" syntax
and may be limited to a threshold array. Discussions are in progress.
Diffstat (limited to 'pcl/pl')
-rw-r--r-- | pcl/pl/plht.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pcl/pl/plht.c b/pcl/pl/plht.c index 50730f35f..22a856dc4 100644 --- a/pcl/pl/plht.c +++ b/pcl/pl/plht.c @@ -40,6 +40,7 @@ pl_set_pcl_halftone(gs_gstate * pgs, gs_mapping_proc transfer_proc, if (code < 0) return code; ht.type = ht_type_threshold; + ht.objtype = HT_OBJTYPE_DEFAULT; ht.params.threshold.width = width; ht.params.threshold.height = height; ht.params.threshold.thresholds.data = threshold_data.data; |