A interface that provides the necessary features for a painter to draw onto a PdfObject.
More...
#include <PdfCanvas.h>
|
virtual PdfObject * | getContentsObject ()=0 |
|
virtual PdfResources * | getResources ()=0 |
|
virtual PdfDictionaryElement & | getElement ()=0 |
|
A interface that provides the necessary features for a painter to draw onto a PdfObject.
◆ CopyContentsTo()
void PdfCanvas::CopyContentsTo |
( |
charbuff & |
buffer | ) |
const |
◆ 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
◆ GetFromResources()
PdfObject* PoDoFo::PdfCanvas::GetFromResources |
( |
PdfResourceType |
type, |
|
|
const std::string_view & |
key |
|
) |
| |
Get an element from the pages resources dictionary, using a type (category) and a key.
- Parameters
-
type | the type of resource to fetch (e.g. /Font, or /XObject) |
key | the key of the resource |
- Returns
- the object of the resource or nullptr if it was not found
◆ 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
Implemented in PoDoFo::PdfPage.
◆ GetRectRaw()
virtual Rect 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()
Get the resource object of this page.
- Returns
- a resources object
◆ HasRotation()
virtual bool PoDoFo::PdfCanvas::HasRotation |
( |
double & |
teta | ) |
const |
|
pure virtual |
Get the current canvas rotation.
- Parameters
-
teta | counterclockwise 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:
- src/podofo/main/PdfCanvas.h
- src/podofo/main/PdfCanvas.cpp