---
 src/doc/PdfAnnotation.cpp | 8 ++++++++
 src/doc/PdfAnnotation.h   | 7 ++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/doc/PdfAnnotation.cpp b/src/doc/PdfAnnotation.cpp
index 941435b..a02f05d 100644
--- a/src/doc/PdfAnnotation.cpp
+++ b/src/doc/PdfAnnotation.cpp
@@ -123,6 +123,14 @@ PdfRect PdfAnnotation::GetRect() const
         return PdfRect( this->GetObject()->GetDictionary().GetKey( 
PdfName::KeyRect )->GetArray() );
return PdfRect();
+}
+
+void PdfAnnotation::SetRect(const PdfRect & rrect)
+{
+    PdfVariant    rect;
+    rrect.ToVariant(rect);
+    this->GetObject()->GetDictionary().AddKey( PdfName::KeyRect, rect );
+
 }
void SetAppearanceStreamForObject( PdfObject* pForObject, PdfXObject* pObject, EPdfAnnotationAppearance eAppearance, const PdfName & state )
diff --git a/src/doc/PdfAnnotation.h b/src/doc/PdfAnnotation.h
index 7aa1c6f..b774af7 100644
--- a/src/doc/PdfAnnotation.h
+++ b/src/doc/PdfAnnotation.h
@@ -161,7 +161,12 @@ class PODOFO_DOC_API PdfAnnotation : public PdfElement {
     /** Get the rectangle of this annotation
      *  \returns a rectangle
      */
-    PdfRect GetRect() const;
+    PdfRect GetRect() const;
+
+    /** Set the rectangle of this annotation
+    *  \param rrect
+    */
+    void SetRect( const PdfRect & rrect);
/** Set the flags of this annotation.
      *  \param uiFlags is an unsigned 32bit integer with different
--
2.16.1.windows.1



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to