diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/mupdf/fitz/device.h | 16 | ||||
-rw-r--r-- | include/mupdf/fitz/writer.h | 4 |
2 files changed, 12 insertions, 8 deletions
diff --git a/include/mupdf/fitz/device.h b/include/mupdf/fitz/device.h index 02f20ef6..99588075 100644 --- a/include/mupdf/fitz/device.h +++ b/include/mupdf/fitz/device.h @@ -338,8 +338,10 @@ enum draw device, see fz_clear_pixmap* for how to clear it prior to calling fz_new_draw_device. Free the device by calling fz_drop_device. + + transform: Transform from user space in points to device space in pixels. */ -fz_device *fz_new_draw_device(fz_context *ctx, fz_pixmap *dest); +fz_device *fz_new_draw_device(fz_context *ctx, const fz_matrix *transform, fz_pixmap *dest); /* fz_new_draw_device_with_bbox: Create a device to draw on a pixmap. @@ -350,12 +352,14 @@ fz_device *fz_new_draw_device(fz_context *ctx, fz_pixmap *dest); calling fz_new_draw_device. Free the device by calling fz_drop_device. + transform: Transform from user space in points to device space in pixels. + clip: Bounding box to restrict any marking operations of the draw device. */ -fz_device *fz_new_draw_device_with_bbox(fz_context *ctx, fz_pixmap *dest, const fz_irect *clip); +fz_device *fz_new_draw_device_with_bbox(fz_context *ctx, const fz_matrix *transform, fz_pixmap *dest, const fz_irect *clip); -fz_device *fz_new_draw_device_type3(fz_context *ctx, fz_pixmap *dest); +fz_device *fz_new_draw_device_type3(fz_context *ctx, const fz_matrix *transform, fz_pixmap *dest); /* struct fz_draw_options: Options for creating a pixmap and draw device. @@ -382,10 +386,10 @@ fz_draw_options *fz_parse_draw_options(fz_context *ctx, fz_draw_options *options /* 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. + options: Options to configure the draw device, and choose the resolution and colorspace. + mediabox: The bounds of the page in points. 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); +fz_device *fz_new_draw_device_with_options(fz_context *ctx, const fz_draw_options *options, const fz_rect *mediabox, fz_pixmap **pixmap); #endif diff --git a/include/mupdf/fitz/writer.h b/include/mupdf/fitz/writer.h index 98b0824a..6f0f47be 100644 --- a/include/mupdf/fitz/writer.h +++ b/include/mupdf/fitz/writer.h @@ -11,7 +11,7 @@ typedef struct fz_document_writer_s fz_document_writer; struct fz_document_writer_s { - fz_device *(*begin_page)(fz_context *ctx, fz_document_writer *wri, const fz_rect *mediabox, fz_matrix *ctm); + fz_device *(*begin_page)(fz_context *ctx, fz_document_writer *wri, const fz_rect *mediabox); void (*end_page)(fz_context *ctx, fz_document_writer *wri, fz_device *dev); void (*close)(fz_context *ctx, fz_document_writer *wri); }; @@ -20,7 +20,7 @@ int fz_has_option(fz_context *ctx, const char *opts, const char *key, const char fz_document_writer *fz_new_document_writer(fz_context *ctx, const char *path, const char *format, const char *options); -fz_device *fz_begin_page(fz_context *ctx, fz_document_writer *wri, const fz_rect *mediabox, fz_matrix *ctm); +fz_device *fz_begin_page(fz_context *ctx, fz_document_writer *wri, const fz_rect *mediabox); void fz_end_page(fz_context *ctx, fz_document_writer *wri, fz_device *dev); void fz_close_document_writer(fz_context *ctx, fz_document_writer *wri); void fz_drop_document_writer(fz_context *ctx, fz_document_writer *wri); |