aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFPageObjectHelper.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2021-02-22 22:02:47 +0100
committerJay Berkenbilt <ejb@ql.org>2021-02-23 00:42:06 +0100
commit8e8c0d8290409358488b2a04af81771989944552 (patch)
tree49b330543ab82067d256e574a6b7efea7d2df044 /libqpdf/QPDFPageObjectHelper.cc
parent61d41e2e8858d8c51e097d8f993291dc210f30a5 (diff)
downloadqpdf-8e8c0d8290409358488b2a04af81771989944552.tar.zst
Add new placeFormXObject that takes a matrix reference
Diffstat (limited to 'libqpdf/QPDFPageObjectHelper.cc')
-rw-r--r--libqpdf/QPDFPageObjectHelper.cc17
1 files changed, 16 insertions, 1 deletions
diff --git a/libqpdf/QPDFPageObjectHelper.cc b/libqpdf/QPDFPageObjectHelper.cc
index aa7eb912..4460415b 100644
--- a/libqpdf/QPDFPageObjectHelper.cc
+++ b/libqpdf/QPDFPageObjectHelper.cc
@@ -1070,7 +1070,22 @@ QPDFPageObjectHelper::placeFormXObject(
bool invert_transformations,
bool allow_shrink, bool allow_expand)
{
- QPDFMatrix cm = getMatrixForFormXObjectPlacement(
+ QPDFMatrix cm;
+ return placeFormXObject(
+ fo, name, rect, cm, invert_transformations,
+ allow_shrink, allow_expand);
+}
+
+std::string
+QPDFPageObjectHelper::placeFormXObject(
+ QPDFObjectHandle fo, std::string const& name,
+ QPDFObjectHandle::Rectangle rect,
+ QPDFMatrix& cm,
+ bool invert_transformations,
+ bool allow_shrink,
+ bool allow_expand)
+{
+ cm = getMatrixForFormXObjectPlacement(
fo, rect, invert_transformations, allow_shrink, allow_expand);
return (
"q\n" +