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 /xps | |
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 'xps')
-rw-r--r-- | xps/xpstop.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/xps/xpstop.c b/xps/xpstop.c index f7212940c..7389fb7e0 100644 --- a/xps/xpstop.c +++ b/xps/xpstop.c @@ -597,6 +597,7 @@ xps_install_halftone(xps_context_t *ctx, gx_device *pdevice) if (gx_device_must_halftone(pdevice)) { 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 = thresh.data; |