Logo Search packages:      
Sourcecode: libpodofo version File versions  Download package

PdfAnnotation * PoDoFo::PdfPage::CreateAnnotation ( EPdfAnnotation  eType,
const PdfRect rRect 

Create a new annotation to this page.

eTypethe type of the annotation
rRectrectangle of the annotation on the page
the annotation object which is owned by the PdfPage

Definition at line 299 of file PdfPage.cpp.

References GetAnnotationsArray(), PoDoFo::PdfVariant::GetArray(), PoDoFo::PdfElement::GetObject(), PoDoFo::PdfArray::push_back(), and PoDoFo::PdfObject::Reference().

    PdfAnnotation* pAnnot = new PdfAnnotation( this, eType, rRect, this->GetObject()->GetOwner() );
    PdfObject*     pObj   = this->GetAnnotationsArray( true );
    PdfReference   ref    = pAnnot->GetObject()->Reference();

    pObj->GetArray().push_back( ref );
    m_mapAnnotations[ref] = pAnnot;

    return pAnnot;

Here is the call graph for this function:

Generated by  Doxygen 1.6.0   Back to index