From 104fd6da522c8828571580cb30f324c3cbe7283f Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Mon, 24 Dec 2018 17:54:48 -0500 Subject: Add matrix and annotation appearance stream handling Generate page content fragment for rendering appearance streams including all matrix calculation. --- include/qpdf/QPDFAnnotationObjectHelper.hh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'include') 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 { -- cgit v1.2.3-70-g09d2