summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2016-04-26 20:11:49 +0200
committerTor Andersson <tor.andersson@artifex.com>2016-04-27 17:01:06 +0200
commit9b4acc78d2a56a5f79d69f50e72197930509505e (patch)
treeb30e03bd1e80d859b578324425e2486f122c5ac8 /docs
parented763d50c7363af5f09d24d0e04b95ca59ff7960 (diff)
downloadmupdf-9b4acc78d2a56a5f79d69f50e72197930509505e.tar.xz
Add fz_close_device function.
Garbage collected languages need a way to signal that they are done with a device other than freeing it. Call it implicitly on fz_drop_device; so take care not to call it again in case it has been explicitly called already.
Diffstat (limited to 'docs')
-rw-r--r--docs/mutool/examples/draw-device.js2
-rw-r--r--docs/mutool/run.html5
2 files changed, 6 insertions, 1 deletions
diff --git a/docs/mutool/examples/draw-device.js b/docs/mutool/examples/draw-device.js
index 4912e956..140fb54b 100644
--- a/docs/mutool/examples/draw-device.js
+++ b/docs/mutool/examples/draw-device.js
@@ -40,6 +40,6 @@ var transform = [2,0,0,2,0,0]
}
device.popClip();
}
-//device.flush();
+device.close();
pixmap.saveAsPNG("out.png");
diff --git a/docs/mutool/run.html b/docs/mutool/run.html
index 07f852de..8460f2f8 100644
--- a/docs/mutool/run.html
+++ b/docs/mutool/run.html
@@ -368,6 +368,11 @@ otherwise the color is ignored completely and the mask is derived from the alpha
Apply a clip mask to restrict the pattern to the desired shape.
</dl>
+<dl>
+<dt>Device#close()
+<dd>Tell the device that we are done, and flush any pending output.
+</dl>
+
<h2>
Path
</h2>