summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2016-06-16 16:32:08 +0200
committerTor Andersson <tor.andersson@artifex.com>2016-06-17 14:53:20 +0200
commitccaf716d6c3f20731aaed277653cf3b1be4e218b (patch)
tree3cb2f6e7776007a66dd74ccf1323c17a2c597c2f /docs
parent27269d493d66e16bfd7a5b5a0b09c4f21693260b (diff)
downloadmupdf-ccaf716d6c3f20731aaed277653cf3b1be4e218b.tar.xz
Add device space transform state to draw device.
Allows us to remove the out parameter 'transform' from fz_begin_page.
Diffstat (limited to 'docs')
-rw-r--r--docs/mutool/run.html10
1 files changed, 6 insertions, 4 deletions
diff --git a/docs/mutool/run.html b/docs/mutool/run.html
index 3d8f2753..44eedec0 100644
--- a/docs/mutool/run.html
+++ b/docs/mutool/run.html
@@ -120,6 +120,9 @@ Matrices and Rectangles
</h2>
<p>
+All dimensions are in points unless otherwise specified.
+
+<p>
Matrices are simply 6-element arrays representing a 3-by-3 transformation matrix as
<pre>
@@ -183,6 +186,7 @@ MuPDF can open many document types (PDF, XPS, CBZ, EPUB, FB2 and a handful of im
<dt>Page#run(device, transform)
<dd>Calls device functions for all the contents on the page, using the specified transform matrix.
The device can be one of the built-in devices or a JavaScript object with methods for the device calls.
+The transform maps from user space points to device space pixels.
<dt>Page#toPixmap(transform, colorspace)
<dd>Render the page into a Pixmap, using the transform and colorspace.
<dt>Page#toDisplayList()
@@ -251,7 +255,7 @@ DrawDevice
The DrawDevice can be used to render to a Pixmap; either by running a Page with it or by calling its methods directly.
<dl>
-<dt>new DrawDevice(pixmap)
+<dt>new DrawDevice(transform, pixmap)
<dd>Create a device for drawing into a pixmap. The pixmap bounds used should match the transformed page bounds,
or you can adjust them to only draw a part of the page.
</dl>
@@ -481,10 +485,8 @@ Document writer objects are used to create new documents in several formats.
<dd>Create a new document writer to create a document with the specified format and output options.
If format is null it is inferred from the filename suffix. The options argument is a comma separated list
of flags and key-value pairs. See below for more details.
-<dt>DocumentWriter#beginPage(mediabox, transform)
+<dt>DocumentWriter#beginPage(mediabox)
<dd>Begin rendering a new page. Returns a Device that can be used to render the page graphics.
-The transform argument must be an empty array which is set to the transform matrix to be
-used with the device functions.
<dt>DocumentWriter#endPage(device)
<dd>Finish the page rendering.
The argument must be the same device object that was returned by the beginPage method.