From 5cec6b4c3df09b59464c9a492b60b86ffd0d5311 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Thu, 18 Feb 2021 09:14:05 -0500 Subject: Add QPDFPageObjectHelper::getMatrixForFormXObjectPlacement --- include/qpdf/QPDFPageObjectHelper.hh | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include') diff --git a/include/qpdf/QPDFPageObjectHelper.hh b/include/qpdf/QPDFPageObjectHelper.hh index 73344caf..76f42dbd 100644 --- a/include/qpdf/QPDFPageObjectHelper.hh +++ b/include/qpdf/QPDFPageObjectHelper.hh @@ -24,6 +24,7 @@ #include #include +#include #include @@ -306,6 +307,16 @@ class QPDFPageObjectHelper: public QPDFObjectHelper bool allow_shrink = true, bool allow_expand = false); + // Return the transformation matrix that translates from the given + // form XObject's coordinate system into the given rectangular + // region on the page. The parameters have the same meaning as for + // placeFormXObject. + QPDF_DLL + QPDFMatrix getMatrixForFormXObjectPlacement( + QPDFObjectHandle fo, QPDFObjectHandle::Rectangle rect, + bool invert_transformations = true, + bool allow_shrink = true, bool allow_expand = false); + // If a page is rotated using /Rotate in the page's dictionary, // instead rotate the page by the same amount by altering the // contents and removing the /Rotate key. This method adjusts the -- cgit v1.2.3-54-g00ecf