diff options
author | Jay Berkenbilt <ejb@ql.org> | 2021-02-21 13:51:17 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2021-02-21 20:58:45 +0100 |
commit | e899926e0d0e8ccafdc2660b247ac127e2a97164 (patch) | |
tree | ff641161c2e95c70bc1d1bd63b84acf48c66ebe9 | |
parent | aa848126cb6ceb00bd93e71d0ce53d93ee824897 (diff) | |
download | qpdf-e899926e0d0e8ccafdc2660b247ac127e2a97164.tar.zst |
Use QPDFMatrix inside flattenRotations
-rw-r--r-- | libqpdf/QPDFPageObjectHelper.cc | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/libqpdf/QPDFPageObjectHelper.cc b/libqpdf/QPDFPageObjectHelper.cc index e744457b..b7f96dc0 100644 --- a/libqpdf/QPDFPageObjectHelper.cc +++ b/libqpdf/QPDFPageObjectHelper.cc @@ -1168,9 +1168,7 @@ QPDFPageObjectHelper::flattenRotation() // the same offset from the lower left corner of the media box. // These calculations have been verified empirically with various // PDF readers. - QPDFObjectHandle::Matrix cm; - cm.e = 0.0; - cm.f = 0.0; + QPDFMatrix cm(0, 0, 0, 0, 0, 0); switch (rotate) { case 90: @@ -1196,13 +1194,7 @@ QPDFPageObjectHelper::flattenRotation() break; } std::string cm_str = - std::string("q\n") + - QUtil::double_to_string(cm.a, 2) + " " + - QUtil::double_to_string(cm.b, 2) + " " + - QUtil::double_to_string(cm.c, 2) + " " + - QUtil::double_to_string(cm.d, 2) + " " + - QUtil::double_to_string(cm.e, 2) + " " + - QUtil::double_to_string(cm.f, 2) + " cm\n"; + std::string("q\n") + cm.unparse() + " cm\n"; this->oh.addPageContents( QPDFObjectHandle::newStream(qpdf, cm_str), true); this->oh.addPageContents( |