PoDoFo 1.0.0-dev
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
PoDoFo::PdfCanvas Class Referenceabstract

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

#include <PdfCanvas.h>

Inheritance diagram for PoDoFo::PdfCanvas:
PoDoFo::PdfPage

Public Member Functions

virtual ~PdfCanvas ()
 Virtual destructor to avoid compiler warnings.
 
const PdfObjectGetContentsObject () const
 Get access to the contents object of this page.
 
PdfObjectGetContentsObject ()
 
virtual PdfObjectStreamGetOrCreateContentsStream (PdfStreamAppendFlags flags)=0
 Get access an object that you can use to ADD drawing to.
 
virtual PdfObjectStreamResetContentsStream ()=0
 Reset the contents object and create a new stream for appending.
 
charbuff GetContentsCopy () const
 
void CopyContentsTo (charbuff &buffer) const
 
virtual void CopyContentsTo (OutputStream &stream) const =0
 
PdfResourcesGetResources ()
 Get the resource object of this page.
 
const PdfResourcesGetResources () const
 
PdfDictionaryElement & GetElement ()
 
const PdfDictionaryElement & GetElement () const
 
virtual PdfResourcesGetOrCreateResources ()=0
 Get or create the resource object of this page.
 
void EnsureResourcesCreated ()
 Ensure resources initialized on this canvas.
 
virtual Corners GetRectRaw () const =0
 Get the current canvas size in PDF Units.
 
virtual bool TryGetRotationRadians (double &teta) const =0
 Try getting the current canvas rotation.
 

Protected Member Functions

virtual PdfObjectgetContentsObject ()=0
 
virtual PdfResourcesgetResources ()=0
 
virtual PdfDictionaryElement & getElement ()=0
 

Detailed Description

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

Member Function Documentation

◆ CopyContentsTo()

void PdfCanvas::CopyContentsTo ( charbuff buffer) const
Remarks
It clears the buffer before copying

◆ GetContentsObject()

const PdfObject * PdfCanvas::GetContentsObject ( ) const

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

◆ GetOrCreateContentsStream()

virtual PdfObjectStream & PoDoFo::PdfCanvas::GetOrCreateContentsStream ( PdfStreamAppendFlags  flags)
pure virtual

Get access an object that you can use to ADD drawing to.

Returns
a contents stream object

◆ GetOrCreateResources()

virtual PdfResources & PoDoFo::PdfCanvas::GetOrCreateResources ( )
pure virtual

Get or create the resource object of this page.

Returns
a resources object

◆ GetRectRaw()

virtual Corners PoDoFo::PdfCanvas::GetRectRaw ( ) const
pure virtual

Get the current canvas size in PDF Units.

Returns
a Rect containing the page size available for drawing

Implemented in PoDoFo::PdfPage.

◆ GetResources()

PdfResources * PdfCanvas::GetResources ( )

Get the resource object of this page.

Returns
a resources object

◆ TryGetRotationRadians()

virtual bool PoDoFo::PdfCanvas::TryGetRotationRadians ( double teta) const
pure virtual

Try getting the current canvas rotation.

Parameters
tetacounterclockwise rotation in radians
Returns
true if the canvas has a rotation

Implemented in PoDoFo::PdfPage.


The documentation for this class was generated from the following files: