diff options
author | Robin Watts <robin.watts@artifex.com> | 2013-12-13 16:54:29 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2014-01-02 20:04:44 +0000 |
commit | fc5bcdc79a12fb01b6cd07aa142c01ef11430b34 (patch) | |
tree | 547ed060a16453df001ffcb34657de46418872ff /include | |
parent | 651f13408c67a8392ad93adda079c096d8a6118c (diff) | |
download | mupdf-fc5bcdc79a12fb01b6cd07aa142c01ef11430b34.tar.xz |
Add rebinding for fz_devices and fz_documents
The SVG device needs rebinding as it holds a file. The PDF device needs
to rebind the underlying pdf document.
All documents need to rebind their underlying streams.
Diffstat (limited to 'include')
-rw-r--r-- | include/mupdf/fitz/device.h | 3 | ||||
-rw-r--r-- | include/mupdf/fitz/document.h | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/mupdf/fitz/device.h b/include/mupdf/fitz/device.h index fe4a1dbd..a95a5ab1 100644 --- a/include/mupdf/fitz/device.h +++ b/include/mupdf/fitz/device.h @@ -103,6 +103,8 @@ struct fz_device_s void (*free_user)(fz_device *); fz_context *ctx; + void (*rebind)(fz_device *); + void (*begin_page)(fz_device *, const fz_rect *rect, const fz_matrix *ctm); void (*end_page)(fz_device *); @@ -141,6 +143,7 @@ struct fz_device_s fz_rect scissor_accumulator; }; +void fz_rebind_device(fz_device *dev, fz_context *ctx); void fz_begin_page(fz_device *dev, const fz_rect *rect, const fz_matrix *ctm); void fz_end_page(fz_device *dev); void fz_fill_path(fz_device *dev, fz_path *path, int even_odd, const fz_matrix *ctm, fz_colorspace *colorspace, float *color, float alpha); diff --git a/include/mupdf/fitz/document.h b/include/mupdf/fitz/document.h index d1bbd75b..d185a31d 100644 --- a/include/mupdf/fitz/document.h +++ b/include/mupdf/fitz/document.h @@ -38,6 +38,7 @@ struct fz_document_s fz_annot *(*next_annot)(fz_document *doc, fz_annot *annot); fz_rect *(*bound_annot)(fz_document *doc, fz_annot *annot, fz_rect *rect); void (*write)(fz_document *doc, char *filename, fz_write_options *opts); + void (*rebind)(fz_document *doc, fz_context *ctx); }; /* @@ -226,4 +227,6 @@ void fz_free_page(fz_document *doc, fz_page *page); */ fz_transition *fz_page_presentation(fz_document *doc, fz_page *page, float *duration); +void fz_rebind_document(fz_document *doc, fz_context *ctx); + #endif |