From ccaf716d6c3f20731aaed277653cf3b1be4e218b Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 16 Jun 2016 16:32:08 +0200 Subject: Add device space transform state to draw device. Allows us to remove the out parameter 'transform' from fz_begin_page. --- docs/mutool/run.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'docs/mutool') 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 @@ -119,6 +119,9 @@ only store bytes. Matrices and Rectangles +

+All dimensions are in points unless otherwise specified. +

Matrices are simply 6-element arrays representing a 3-by-3 transformation matrix as @@ -183,6 +186,7 @@ MuPDF can open many document types (PDF, XPS, CBZ, EPUB, FB2 and a handful of im

Page#run(device, transform)
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.
Page#toPixmap(transform, colorspace)
Render the page into a Pixmap, using the transform and colorspace.
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.
-
new DrawDevice(pixmap) +
new DrawDevice(transform, pixmap)
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.
@@ -481,10 +485,8 @@ Document writer objects are used to create new documents in several formats.
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. -
DocumentWriter#beginPage(mediabox, transform) +
DocumentWriter#beginPage(mediabox)
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.
DocumentWriter#endPage(device)
Finish the page rendering. The argument must be the same device object that was returned by the beginPage method. -- cgit v1.2.3