diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2018-07-03 15:07:25 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2018-07-05 15:32:35 +0200 |
commit | 96cc776650a1845f4b3894c2311bee4d51d60f20 (patch) | |
tree | e3adedbb6577e9e0509b203c721c038f01019efe /include/mupdf | |
parent | 2f698870f3ec77050694a9731a2a7ecc1b2962dd (diff) | |
download | mupdf-96cc776650a1845f4b3894c2311bee4d51d60f20.tar.xz |
Add fz_transform_page helper function.
Create a matrix that transforms a page with resolution and rotation,
and grid fits the resulting bounding box.
Diffstat (limited to 'include/mupdf')
-rw-r--r-- | include/mupdf/fitz/geometry.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/mupdf/fitz/geometry.h b/include/mupdf/fitz/geometry.h index 04abf5b9..0eb0f844 100644 --- a/include/mupdf/fitz/geometry.h +++ b/include/mupdf/fitz/geometry.h @@ -417,6 +417,14 @@ fz_matrix fz_translate(float tx, float ty); fz_matrix fz_pre_translate(fz_matrix m, float tx, float ty); /* + fz_transform_page: Create transform matrix to draw page + at a given resolution and rotation. Adjusts the scaling + factors so that the page covers whole number of + pixels and adjust the page origin to be at 0,0. +*/ +fz_matrix fz_transform_page(fz_rect mediabox, float resolution, float rotate); + +/* fz_invert_matrix: Create an inverse matrix. inverse: Place to store inverse matrix. |