diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-06-16 11:22:57 +0200 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2016-06-16 18:08:15 +0100 |
commit | 3ab4938180ee24769b081badfe6c2fe91c924b3f (patch) | |
tree | bb79612dc987a315f657b770f69b6c5134e1651c /include | |
parent | 5825ef8805ca8439ac576fb0071f9ddbdf8f6281 (diff) | |
download | mupdf-3ab4938180ee24769b081badfe6c2fe91c924b3f.tar.xz |
Add fz_draw_options struct for use with draw device.
Diffstat (limited to 'include')
-rw-r--r-- | include/mupdf/fitz/device.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/include/mupdf/fitz/device.h b/include/mupdf/fitz/device.h index 3a3dd416..02f20ef6 100644 --- a/include/mupdf/fitz/device.h +++ b/include/mupdf/fitz/device.h @@ -357,4 +357,35 @@ fz_device *fz_new_draw_device_with_bbox(fz_context *ctx, fz_pixmap *dest, const fz_device *fz_new_draw_device_type3(fz_context *ctx, fz_pixmap *dest); +/* + struct fz_draw_options: Options for creating a pixmap and draw device. +*/ +typedef struct fz_draw_options_s fz_draw_options; + +struct fz_draw_options_s +{ + int rotate; + int resolution; + int width; + int height; + fz_colorspace *colorspace; + int alpha; +}; + +extern const char *fz_draw_options_usage; + +/* + fz_parse_draw_options: Parse draw device options from a comma separated key-value string. +*/ +fz_draw_options *fz_parse_draw_options(fz_context *ctx, fz_draw_options *options, const char *string); + +/* + fz_new_draw_device_with_options: Create a new pixmap and draw device, using the specified options. + + mediabox: An in parameter containing the size of the page. + pixmap: An out parameter containing the newly created pixmap. + transform: An out parameter containing the transform to be used when running the page. +*/ +fz_device *fz_new_draw_device_with_options(fz_context *ctx, const fz_draw_options *opts, const fz_rect *mediabox, fz_matrix *transform, fz_pixmap **pixmap); + #endif |