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

PdfPage * PoDoFo::PdfPagesTree::CreatePage ( const PdfRect rSize )

Creates a new page object and inserts it into the internal page tree. The returned page is owned by the pages tree and will get deleted along with it!

Parameters:
rSizea PdfRect specifying the size of the page (i.e the /MediaBox key) in PDF units
Returns:
a pointer to a PdfPage object

Definition at line 165 of file PdfPagesTree.cpp.

References PoDoFo::PdfPagesTreeCache::AddPageObject(), GetRoot(), GetTotalNumberOfPages(), and InsertPage().

Referenced by PoDoFo::PdfDocument::CreatePage().

{
    PdfPage* pPage = new PdfPage( rSize, GetRoot()->GetOwner() );

    InsertPage( this->GetTotalNumberOfPages() - 1, pPage );
    m_cache.AddPageObject( this->GetTotalNumberOfPages() - 1, pPage );
    
    return pPage;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index