From fc5bcdc79a12fb01b6cd07aa142c01ef11430b34 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Fri, 13 Dec 2013 16:54:29 +0000 Subject: 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. --- include/mupdf/fitz/device.h | 3 +++ include/mupdf/fitz/document.h | 3 +++ 2 files changed, 6 insertions(+) (limited to 'include') 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 -- cgit v1.2.3