diff options
author | Robin Watts <robin.watts@artifex.com> | 2013-05-20 17:23:12 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-05-21 14:20:47 +0100 |
commit | d021304f9ff6f74bcc53bf7f42a504bd1b033266 (patch) | |
tree | 91a45a7de144ab94a7d4edb2f2cc8cc67f205c3b /fitz/fitz.h | |
parent | a3d00b2c51c1df23258f774f58268be794384c27 (diff) | |
download | mupdf-d021304f9ff6f74bcc53bf7f42a504bd1b033266.tar.xz |
Add PWG options structure for writing PWGs.
This should (pretty much) give us enough to write a mupdftoraster
equivalent of gstoraster.
Diffstat (limited to 'fitz/fitz.h')
-rw-r--r-- | fitz/fitz.h | 54 |
1 files changed, 51 insertions, 3 deletions
diff --git a/fitz/fitz.h b/fitz/fitz.h index 05bf85fb..7b3f33f5 100644 --- a/fitz/fitz.h +++ b/fitz/fitz.h @@ -1720,13 +1720,61 @@ void fz_write_pam(fz_context *ctx, fz_pixmap *pixmap, char *filename, int saveal */ void fz_write_png(fz_context *ctx, fz_pixmap *pixmap, char *filename, int savealpha); +typedef struct fz_pwg_options_s fz_pwg_options; + +struct fz_pwg_options_s +{ + /* These are not interpreted as CStrings by the writing code, but + * are rather copied directly out. */ + char media_class[64]; + char media_color[64]; + char media_type[64]; + char output_type[64]; + + unsigned int advance_distance; + int advance_media; + int collate; + int cut_media; + int duplex; + int insert_sheet; + int jog; + int leading_edge; + int manual_feed; + unsigned int media_position; + unsigned int media_weight; + int mirror_print; + int negative_print; + unsigned int num_copies; + int orientation; + int output_face_up; + unsigned int PageSize[2]; + int separations; + int tray_switch; + int tumble; + + int media_type_num; + int compression; + unsigned int row_count; + unsigned int row_feed; + unsigned int row_step; + + /* These are not interpreted as CStrings by the writing code, but + * are rather copied directly out. */ + char rendering_intent[64]; + char page_size_name[64]; +}; + /* fz_write_pwg: Save a pixmap as a pwg filename: The filename to save as (including extension). + append: If non-zero, then append a new page to existing file. + + pwg: NULL, or a pointer to an options structure (initialised to zero + before being filled in, for future expansion). */ -void fz_write_pwg(fz_context *ctx, fz_pixmap *pixmap, char *filename, int append); +void fz_write_pwg(fz_context *ctx, fz_pixmap *pixmap, char *filename, int append, const fz_pwg_options *pwg); /* fz_write_pbm: Save a bitmap as a pbm @@ -1858,7 +1906,7 @@ void fz_output_png(fz_output *out, const fz_pixmap *pixmap, int savealpha); /* Output a pixmap to an output stream as a pwg raster. */ -void fz_output_pwg(fz_output *out, const fz_pixmap *pixmap); +void fz_output_pwg(fz_output *out, const fz_pixmap *pixmap, const fz_pwg_options *pwg); /* Output the file header to a pwg stream, ready for pages to follow it. @@ -1868,7 +1916,7 @@ void fz_output_pwg_file_header(fz_output *out); /* Output a page to a pwg stream to follow a header, or other pages. */ -void fz_output_pwg_page(fz_output *out, const fz_pixmap *pixmap); +void fz_output_pwg_page(fz_output *out, const fz_pixmap *pixmap, const fz_pwg_options *pwg); /* Get an image as a png in a buffer. |