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 /source/fitz/device.c | |
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 'source/fitz/device.c')
-rw-r--r-- | source/fitz/device.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/fitz/device.c b/source/fitz/device.c index fa428764..d9249732 100644 --- a/source/fitz/device.c +++ b/source/fitz/device.c @@ -36,6 +36,16 @@ fz_disable_device_hints(fz_device *dev, int hints) } void +fz_rebind_device(fz_device *dev, fz_context *ctx) +{ + if (dev == NULL) + return; + dev->ctx = ctx; + if (dev->rebind) + dev->rebind(dev); +} + +void fz_begin_page(fz_device *dev, const fz_rect *rect, const fz_matrix *ctm) { if (dev->begin_page) |