aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2018-12-24 23:54:48 +0100
committerJay Berkenbilt <ejb@ql.org>2019-01-01 14:07:21 +0100
commit104fd6da522c8828571580cb30f324c3cbe7283f (patch)
treeecf6b20dd9fbd6f70c53efda935504114f23701f /include
parent5059ec0d35547c0b3328c3089221b7cb3c3ac45d (diff)
downloadqpdf-104fd6da522c8828571580cb30f324c3cbe7283f.tar.zst
Add matrix and annotation appearance stream handling
Generate page content fragment for rendering appearance streams including all matrix calculation.
Diffstat (limited to 'include')
-rw-r--r--include/qpdf/QPDFAnnotationObjectHelper.hh18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/qpdf/QPDFAnnotationObjectHelper.hh b/include/qpdf/QPDFAnnotationObjectHelper.hh
index e7e1a372..76ff0eac 100644
--- a/include/qpdf/QPDFAnnotationObjectHelper.hh
+++ b/include/qpdf/QPDFAnnotationObjectHelper.hh
@@ -72,6 +72,24 @@ class QPDFAnnotationObjectHelper: public QPDFObjectHelper
QPDFObjectHandle getAppearanceStream(std::string const& which,
std::string const& state = "");
+ // Return a matrix that transforms from the annotation's
+ // appearance stream's coordinates to the page's coordinates. This
+ // method also honors the annotation's NoRotate flag if set. The
+ // matrix is returned as a string representing the six floating
+ // point numbers to be passed to a cm operator. Returns the empty
+ // string if it is unable to compute the matrix for any reason.
+ // The value "rotate" should be set to the page's /Rotate value or
+ // 0 if none.
+ QPDF_DLL
+ std::string getAnnotationAppearanceMatrix(int rotate);
+
+ // Generate text suitable for addition to the containing page's
+ // content stream that replaces this annotation's appearance
+ // stream. The value "rotate" should be set to the page's /Rotate
+ // value or 0 if none.
+ QPDF_DLL
+ std::string getPageContentForAppearance(int rotate);
+
private:
class Members
{