PoDoFo  0.9.4
Public Member Functions | Static Public Member Functions | List of all members
PoDoFo::PdfCanvas Class Referenceabstract

#include <PdfCanvas.h>

Inheritance diagram for PoDoFo::PdfCanvas:
PoDoFo::PdfPage PoDoFo::PdfXObject PoDoFo::PdfImage

Public Member Functions

virtual ~PdfCanvas ()
 
virtual PdfObjectGetContents () const =0
 
virtual PdfObjectGetContentsForAppending () const =0
 
virtual PdfObjectGetResources () const =0
 
virtual const PdfRect GetPageSize () const =0
 
void AddColorResource (const PdfColor &rColor)
 
void AddResource (const PdfName &rIdentifier, const PdfReference &rRef, const PdfName &rName)
 

Static Public Member Functions

static const PdfArrayGetProcSet ()
 

Detailed Description

A interface that provides the necessary features for a painter to draw onto a PdfObject.

Constructor & Destructor Documentation

virtual PoDoFo::PdfCanvas::~PdfCanvas ( )
inlinevirtual

Virtual destructor to avoid compiler warnings

Member Function Documentation

void PoDoFo::PdfCanvas::AddColorResource ( const PdfColor rColor)

Register a colourspace for a (separation) colour in the resource dictionary of this page or XObbject so that it can be used for any following drawing operations.

Parameters
rColorreference to the PdfColor
void PoDoFo::PdfCanvas::AddResource ( const PdfName rIdentifier,
const PdfReference rRef,
const PdfName rName 
)

Register an object in the resource dictionary of this page or XObbject so that it can be used for any following drawing operations.

Parameters
rIdentifieridentifier of this object, e.g. /Ft0
rRefreference to the object you want to register
rNameregister under this key in the resource dictionary
virtual PdfObject* PoDoFo::PdfCanvas::GetContents ( ) const
pure virtual

Get access to the contents object of this page. If you want to draw onto the page, you have to add drawing commands to the stream of the Contents object.

Returns
a contents object

Implemented in PoDoFo::PdfPage, and PoDoFo::PdfXObject.

virtual PdfObject* PoDoFo::PdfCanvas::GetContentsForAppending ( ) const
pure virtual

Get access an object that you can use to ADD drawing to. If you want to draw onto the page, you have to add drawing commands to the stream of the Contents object.

Returns
a contents object

Implemented in PoDoFo::PdfPage, and PoDoFo::PdfXObject.

virtual const PdfRect PoDoFo::PdfCanvas::GetPageSize ( ) const
pure virtual

Get the current page size in PDF Units

Returns
a PdfRect containing the page size available for drawing

Implemented in PoDoFo::PdfXObject, and PoDoFo::PdfPage.

const PdfArray & PoDoFo::PdfCanvas::GetProcSet ( )
static

Get a reference to a static procset PdfArray.

Returns
a reference to a static procset PdfArray
virtual PdfObject* PoDoFo::PdfCanvas::GetResources ( ) const
pure virtual

Get access to the resources object of this page. This is most likely an internal object.

Returns
a resources object

Implemented in PoDoFo::PdfPage, and PoDoFo::PdfXObject.