summaryrefslogtreecommitdiff
path: root/devices/gdevbit.c
diff options
context:
space:
mode:
authorRay Johnston <ray.johnston@artifex.com>2021-01-10 10:17:35 -0800
committerRay Johnston <ray.johnston@artifex.com>2021-01-26 09:23:37 -0800
commit3eb6b9866aa1dae4c2778b450cc99b29e9d11d7e (patch)
treef8967ed8a324106cc2f4d98b11bb4a89419dc0af /devices/gdevbit.c
parent7f52ae74a19bf1076ebfb9ed1695b0077fc70ee7 (diff)
downloadghostpdl-3eb6b9866aa1dae4c2778b450cc99b29e9d11d7e.tar.gz
Implement Nup subclass device to support nesting images on a page.
By using a subclassing device to intercept a few of the device procs (get_initial_matrix, output_page, fillpage, put_params, close_device, and dev_spec_op) pages can be placed on to a page that is eventually output. This initial implementation scales the pages on the 'nest' as defined by -sNupControl parameter that is a string of the form "HxV" where H and V are integers controlling nesting across (H) and down (V) the page. All pages on the nest are the same size/orientation as the first page of the nest, and if a different PageSize is encountered, any pages on the current nest will be output before starting a new nest. In gx_device_set_hwsize_from_media dev_spec_op is used to prevent changing the device width and height (HWSize) for PageSize or .MediaSize params. This requires that the graphics library should not assume that HWSize is derived from PageSize and HWResolution, but it allows the intial clip_path for the nested pages to be set from the MediaSize, Margins, and HWMargins in gx_default_clip_box. There are a few files that have differences with the 'psdcmyk' devices when tested with -sNupControl=1x1: Bug688584.ps: Page 6 missing graphics,related to SeparationOrder usage. (a bug will be opened for this once this is committed). Bug692517.ps: subclass device barely switches to clist mode for 72.0 (don't care, page mode still works for larger MaxBitmap), tests_private/pdf/PDFIA1.7_SUBSET/CATX2975.pdf.ppmraw.300.0..gs (seems to be a progression on page 9)
Diffstat (limited to 'devices/gdevbit.c')
-rw-r--r--devices/gdevbit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/devices/gdevbit.c b/devices/gdevbit.c
index 309818e61..655e711e5 100644
--- a/devices/gdevbit.c
+++ b/devices/gdevbit.c
@@ -319,6 +319,8 @@ const gx_device_bit gs_bitrgbtags_device =
0, /*DisablePageHandler*/
0, /*ObjectFilter*/
0, /*ObjectHandlerPushed*/
+ 0, /*NupList*/
+ 0, /*NupHandlerPushed*/
0, /*PageCount*/
0, /*ShowPageCount*/
1, /*NumCopies*/