#include <PdfPainter.h>
Inheritance diagram for PoDoFo::PdfPainter:
Public Member Functions | |
PdfPainter () | |
void | SetPage (PdfCanvas *pPage) |
const PdfCanvas * | GetPage () const |
void | FinishPage () |
void | SetStrokingGray (double g) |
void | SetGray (double g) |
void | SetStrokingColor (double r, double g, double b) |
void | SetColor (double r, double g, double b) |
void | SetStrokingColorCMYK (double c, double m, double y, double k) |
void | SetColorCMYK (double c, double m, double y, double k) |
void | SetStrokingShadingPattern (const PdfShadingPattern &rPattern) |
void | SetShadingPattern (const PdfShadingPattern &rPattern) |
void | SetStrokingColor (const PdfColor &rColor) |
void | SetColor (const PdfColor &rColor) |
void | SetStrokeWidth (double dWidth) |
void | SetStrokeStyle (EPdfStrokeStyle eStyle, const char *pszCustom=NULL) |
void | SetLineCapStyle (EPdfLineCapStyle eCapStyle) |
void | SetLineJoinStyle (EPdfLineJoinStyle eJoinStyle) |
void | SetFont (PdfFont *pFont) |
PdfFont * | GetFont () const |
void | SetClipRect (double dX, double dY, double dWidth, double dHeight) |
void | SetClipRect (const PdfRect &rRect) |
void | DrawLine (double dStartX, double dStartY, double dEndX, double dEndY) |
void | DrawRect (double dX, double dY, double dWidth, double dHeight, double dRoundX=0.0, double dRoundY=0.0) |
void | DrawRect (const PdfRect &rRect, double dRoundX=0.0, double dRoundY=0.0) |
void | FillRect (double dX, double dY, double dWidth, double dHeight, double dRoundX=0.0, double dRoundY=0.0) |
void | FillRect (const PdfRect &rRect, double dRoundX=0.0, double dRoundY=0.0) |
void | DrawEllipse (double dX, double dY, double dWidth, double dHeight) |
void | FillEllipse (double dX, double dY, double dWidth, double dHeight) |
void | DrawCircle (double dX, double dY, double dRadius) |
void | FillCircle (double dX, double dY, double dRadius) |
void | DrawText (double dX, double dY, const PdfString &sText) |
void | DrawText (double dX, double dY, const PdfString &sText, long lLen) |
void | DrawMultiLineText (double dX, double dY, double dWidth, double dHeight, const PdfString &rsText, EPdfAlignment eAlignment=ePdfAlignment_Left, EPdfVerticalAlignment eVertical=ePdfVerticalAlignment_Top) |
void | DrawMultiLineText (const PdfRect &rRect, const PdfString &rsText, EPdfAlignment eAlignment=ePdfAlignment_Left, EPdfVerticalAlignment eVertical=ePdfVerticalAlignment_Top) |
std::vector< TLineElement > | GetMultiLineTextAsLines (double dWidth, const PdfString &rsText) |
void | DrawTextAligned (double dX, double dY, double dWidth, const PdfString &rsText, EPdfAlignment eAlignment) |
void | BeginText (double dX, double dY) |
void | AddText (const PdfString &sText) |
void | AddText (const PdfString &sText, pdf_long lStringLen) |
void | MoveTextPos (double dX, double dY) |
void | EndText () |
void | DrawGlyph (PdfMemDocument *pDocument, double dX, double dY, const char *pszGlyphname) |
void | DrawImage (double dX, double dY, PdfImage *pObject, double dScaleX=1.0, double dScaleY=1.0) |
void | DrawXObject (double dX, double dY, PdfXObject *pObject, double dScaleX=1.0, double dScaleY=1.0) |
void | ClosePath () |
void | LineTo (double dX, double dY) |
void | MoveTo (double dX, double dY) |
void | CubicBezierTo (double dX1, double dY1, double dX2, double dY2, double dX3, double dY3) |
void | HorizonalLineTo (double dX) |
void | VerticalLineTo (double dY) |
void | SmoothCurveTo (double dX2, double dY2, double dX3, double dY3) |
void | QuadCurveTo (double dX1, double dY1, double dX3, double dY3) |
void | SmoothQuadCurveTo (double dX3, double dY3) |
void | ArcTo (double dX, double dY, double dRadiusX, double dRadiusY, double dRotation, bool bLarge, bool bSweep) |
void | Close () |
void | Stroke () |
void | Fill () |
void | Clip (bool useEvenOddRule=false) |
void | Save () |
void | Restore () |
void | SetTransformationMatrix (double a, double b, double c, double d, double e, double f) |
void | SetExtGState (PdfExtGState *inGState) |
void | SetRenderingIntent (char *intent) |
void | SetTabWidth (unsigned short nTabWidth) |
unsigned short | GetTabWidth () const |
void | SetPrecision (unsigned short inPrec) |
unsigned short | GetPrecision () const |
Protected Member Functions | |
void | SetCurrentStrokingColor () |
PdfString | ExpandTabs (const PdfString &rsString, pdf_long lLen) const |
Protected Attributes | |
PdfStream * | m_pCanvas |
PdfCanvas * | m_pPage |
PdfFont * | m_pFont |
unsigned short | m_nTabWidth |
PdfColor | m_curColor |
bool | m_isTextOpen |
std::ostringstream | m_oss |
During all drawing operations, you are still able to access the stream of the object you are drawing on directly.
All functions that take coordinates expect these to be in PDF User Units. Keep in mind that PDF has its coordinate system origin at the bottom left corner.
PoDoFo::PdfPainter::PdfPainter | ( | ) |
Create a new PdfPainter object.
void PoDoFo::PdfPainter::AddText | ( | const PdfString & | sText, | |
pdf_long | lStringLen | |||
) |
Draw a string on a page. You have to call BeginText before the first call of this function and EndText after the last call.
If you want more simpler text output and do not need the advanced text position features of MoveTextPos use DrawText which is easier.
sText | the text string which should be printed | |
lStringLen | draw only lLen characters of pszText |
void PoDoFo::PdfPainter::AddText | ( | const PdfString & | sText | ) |
Draw a string on a page. You have to call BeginText before the first call of this function and EndText after the last call.
If you want more simpler text output and do not need the advanced text position features of MoveTextPos use DrawText which is easier.
sText | the text string which should be printed |
void PoDoFo::PdfPainter::ArcTo | ( | double | dX, | |
double | dY, | |||
double | dRadiusX, | |||
double | dRadiusY, | |||
double | dRotation, | |||
bool | bLarge, | |||
bool | bSweep | |||
) |
Append a Arc to the current path Matches the SVG 'A' operator.
dX | x coordinate of the start point | |
dY | y coordinate of the start point | |
dRadiusX | x coordinate of the end point, which is the new current point | |
dRadiusY | y coordinate of the end point, which is the new current point | |
dRotation | degree of rotation in radians | |
bLarge | large or small portion of the arc | |
bSweep | sweep? |
void PoDoFo::PdfPainter::BeginText | ( | double | dX, | |
double | dY | |||
) |
Begin drawing multiple text strings on a page using a given font object. You have to call SetFont before calling this function.
If you want more simpler text output and do not need the advanced text position features of MoveTextPos use DrawText which is easier.
dX | the x coordinate | |
dY | the y coordinate |
void PoDoFo::PdfPainter::Clip | ( | bool | useEvenOddRule = false |
) |
Clip the current path. Matches the PDF 'W' operator. This function is useful to construct an own path for drawing or clipping.
useEvenOddRule | select even-odd rule instead of nonzero winding number rule |
void PoDoFo::PdfPainter::Close | ( | ) |
Close the current path. Matches the PDF 'h' operator.
void PoDoFo::PdfPainter::ClosePath | ( | ) |
Closes the current path by drawing a line from the current point to the starting point of the path. Matches the PDF 'h' operator. This function is useful to construct an own path for drawing or clipping.
void PoDoFo::PdfPainter::CubicBezierTo | ( | double | dX1, | |
double | dY1, | |||
double | dX2, | |||
double | dY2, | |||
double | dX3, | |||
double | dY3 | |||
) |
Append a cubic bezier curve to the current path Matches the PDF 'c' operator.
dX1 | x coordinate of the first control point | |
dY1 | y coordinate of the first control point | |
dX2 | x coordinate of the second control point | |
dY2 | y coordinate of the second control point | |
dX3 | x coordinate of the end point, which is the new current point | |
dY3 | y coordinate of the end point, which is the new current point |
void PoDoFo::PdfPainter::DrawCircle | ( | double | dX, | |
double | dY, | |||
double | dRadius | |||
) |
Draw a circle with the current stroking settings
dX | x center coordinate of the circle | |
dY | y coordinate of the circle | |
dRadius | radius of the circle |
void PoDoFo::PdfPainter::DrawEllipse | ( | double | dX, | |
double | dY, | |||
double | dWidth, | |||
double | dHeight | |||
) |
Draw an ellipse with the current stroking settings
dX | x coordinate of the ellipse (left coordinate) | |
dY | y coordinate of the ellipse (top coordinate) | |
dWidth | width of the ellipse | |
dHeight | absolute height of the ellipse |
void PoDoFo::PdfPainter::DrawGlyph | ( | PdfMemDocument * | pDocument, | |
double | dX, | |||
double | dY, | |||
const char * | pszGlyphname | |||
) |
Draw a single glyph on a page using a given font object.
pDocument | pointer to the document, needed to generate a copy of the current font | |
dX | the x coordinate | |
dY | the y coordinate | |
pszGlyphname | the name of the glyph which should be printed |
void PoDoFo::PdfPainter::DrawImage | ( | double | dX, | |
double | dY, | |||
PdfImage * | pObject, | |||
double | dScaleX = 1.0 , |
|||
double | dScaleY = 1.0 | |||
) |
Draw an image on the current page.
dX | the x coordinate (bottom left position of the image) | |
dY | the y coordinate (bottom position of the image) | |
pObject | an PdfXObject | |
dScaleX | option scaling factor in x direction | |
dScaleY | option scaling factor in y direction |
void PoDoFo::PdfPainter::DrawLine | ( | double | dStartX, | |
double | dStartY, | |||
double | dEndX, | |||
double | dEndY | |||
) |
Draw a line with the current color and line settings.
dStartX | x coordinate of the starting point | |
dStartY | y coordinate of the starting point | |
dEndX | x coordinate of the ending point | |
dEndY | y coordinate of the ending point |
void PoDoFo::PdfPainter::DrawMultiLineText | ( | const PdfRect & | rRect, | |
const PdfString & | rsText, | |||
EPdfAlignment | eAlignment = ePdfAlignment_Left , |
|||
EPdfVerticalAlignment | eVertical = ePdfVerticalAlignment_Top | |||
) | [inline] |
Draw multiline text into a rectangle doing automatic wordwrapping. The current font is used and SetFont has to be called at least once before using this function
rRect | bounding rectangle of the text | |
rsText | the text which should be drawn | |
eAlignment | alignment of the individual text lines in the given bounding box | |
eVertical | vertical alignment of the text in the given bounding box |
void PoDoFo::PdfPainter::DrawMultiLineText | ( | double | dX, | |
double | dY, | |||
double | dWidth, | |||
double | dHeight, | |||
const PdfString & | rsText, | |||
EPdfAlignment | eAlignment = ePdfAlignment_Left , |
|||
EPdfVerticalAlignment | eVertical = ePdfVerticalAlignment_Top | |||
) |
Draw multiline text into a rectangle doing automatic wordwrapping. The current font is used and SetFont has to be called at least once before using this function
dX | the x coordinate of the text area (left) | |
dY | the y coordinate of the text area (bottom) | |
dWidth | width of the text area | |
dHeight | height of the text area | |
rsText | the text which should be drawn | |
eAlignment | alignment of the individual text lines in the given bounding box | |
eVertical | vertical alignment of the text in the given bounding box |
void PoDoFo::PdfPainter::DrawRect | ( | const PdfRect & | rRect, | |
double | dRoundX = 0.0 , |
|||
double | dRoundY = 0.0 | |||
) | [inline] |
Draw a rectangle with the current stroking settings
rRect | the rectangle area | |
dRoundX | rounding factor, x direction | |
dRoundY | rounding factor, y direction |
void PoDoFo::PdfPainter::DrawRect | ( | double | dX, | |
double | dY, | |||
double | dWidth, | |||
double | dHeight, | |||
double | dRoundX = 0.0 , |
|||
double | dRoundY = 0.0 | |||
) |
Draw a rectangle with the current stroking settings
dX | x coordinate of the rectangle (left coordinate) | |
dY | y coordinate of the rectangle (bottom coordinate) | |
dWidth | width of the rectangle | |
dHeight | absolute height of the rectangle | |
dRoundX | rounding factor, x direction | |
dRoundY | rounding factor, y direction |
void PoDoFo::PdfPainter::DrawText | ( | double | dX, | |
double | dY, | |||
const PdfString & | sText, | |||
long | lLen | |||
) |
Draw a single-line text string on a page using a given font object. You have to call SetFont before calling this function.
dX | the x coordinate | |
dY | the y coordinate | |
sText | the text string which should be printed (is not allowed to be NULL!) | |
lLen | draw only lLen characters of pszText |
void PoDoFo::PdfPainter::DrawText | ( | double | dX, | |
double | dY, | |||
const PdfString & | sText | |||
) |
Draw a single-line text string on a page using a given font object. You have to call SetFont before calling this function.
dX | the x coordinate | |
dY | the y coordinate | |
sText | the text string which should be printed |
void PoDoFo::PdfPainter::DrawTextAligned | ( | double | dX, | |
double | dY, | |||
double | dWidth, | |||
const PdfString & | rsText, | |||
EPdfAlignment | eAlignment | |||
) |
Draw a single line of text horizontally aligned.
dX | the x coordinate of the text line | |
dY | the y coordinate of the text line | |
dWidth | the width of the text line | |
rsText | the text to draw | |
eAlignment | alignment of the text line |
void PoDoFo::PdfPainter::DrawXObject | ( | double | dX, | |
double | dY, | |||
PdfXObject * | pObject, | |||
double | dScaleX = 1.0 , |
|||
double | dScaleY = 1.0 | |||
) |
Draw an XObject on the current page. For PdfImage use DrawImage.
dX | the x coordinate (bottom left position of the XObject) | |
dY | the y coordinate (bottom position of the XObject) | |
pObject | an PdfXObject | |
dScaleX | option scaling factor in x direction | |
dScaleY | option scaling factor in y direction |
void PoDoFo::PdfPainter::EndText | ( | ) |
End drawing multiple text strings on a page
If you want more simpler text output and do not need the advanced text position features of MoveTextPos use DrawText which is easier.
PdfString PoDoFo::PdfPainter::ExpandTabs | ( | const PdfString & | rsString, | |
pdf_long | lLen | |||
) | const [protected] |
Expand all tab characters in a string using spaces.
rsString | expand all tabs in this string using spaces | |
lLen | use only lLen characters of rsString |
void PoDoFo::PdfPainter::Fill | ( | ) |
Fill the current path. Matches the PDF 'f' operator. This function is useful to construct an own path for drawing or clipping.
void PoDoFo::PdfPainter::FillCircle | ( | double | dX, | |
double | dY, | |||
double | dRadius | |||
) |
Fill a Circle with the current fill settings
dX | x center coordinate of the circle | |
dY | y coordinate of the circle | |
dRadius | radius of the circle |
void PoDoFo::PdfPainter::FillEllipse | ( | double | dX, | |
double | dY, | |||
double | dWidth, | |||
double | dHeight | |||
) |
Fill an ellipse with the current fill settings
dX | x coordinate of the ellipse (left coordinate) | |
dY | y coordinate of the ellipse (top coordinate) | |
dWidth | width of the ellipse | |
dHeight | absolute height of the ellipse |
void PoDoFo::PdfPainter::FillRect | ( | const PdfRect & | rRect, | |
double | dRoundX = 0.0 , |
|||
double | dRoundY = 0.0 | |||
) | [inline] |
Fill a rectangle with the current fill settings
rRect | the rectangle area | |
dRoundX | rounding factor, x direction | |
dRoundY | rounding factor, y direction |
void PoDoFo::PdfPainter::FillRect | ( | double | dX, | |
double | dY, | |||
double | dWidth, | |||
double | dHeight, | |||
double | dRoundX = 0.0 , |
|||
double | dRoundY = 0.0 | |||
) |
Fill a rectangle with the current fill settings
dX | x coordinate of the rectangle (left coordinate) | |
dY | y coordinate of the rectangle (bottom coordinate) | |
dWidth | width of the rectangle | |
dHeight | absolute height of the rectangle | |
dRoundX | rounding factor, x direction | |
dRoundY | rounding factor, y direction |
void PoDoFo::PdfPainter::FinishPage | ( | ) |
Finish drawing onto a page.
This has to be called whenever a page has been drawn complete.
PdfFont * PoDoFo::PdfPainter::GetFont | ( | ) | const [inline] |
Get the current font:
std::vector< TLineElement > PoDoFo::PdfPainter::GetMultiLineTextAsLines | ( | double | dWidth, | |
const PdfString & | rsText | |||
) |
Gets the text divided into individual lines, using the current font and clipping rectangle.
dWidth | width of the text area | |
rsText | the text which should be drawn |
const PdfCanvas * PoDoFo::PdfPainter::GetPage | ( | ) | const [inline] |
Return the current page that is that on the painter.
unsigned short PoDoFo::PdfPainter::GetPrecision | ( | ) | const [inline] |
Get the currently set floating point precision
unsigned short PoDoFo::PdfPainter::GetTabWidth | ( | ) | const [inline] |
Get the currently set tab width
TabWidth
void PoDoFo::PdfPainter::HorizonalLineTo | ( | double | dX | ) |
Append a horizontal line to the current path Matches the SVG 'H' operator
dX | x coordinate to draw the line to |
void PoDoFo::PdfPainter::LineTo | ( | double | dX, | |
double | dY | |||
) |
Append a line segment to the current path. Matches the PDF 'l' operator. This function is useful to construct an own path for drawing or clipping.
dX | x position | |
dY | y position |
void PoDoFo::PdfPainter::MoveTextPos | ( | double | dX, | |
double | dY | |||
) |
Move position for text drawing on a page. You have to call BeginText before calling this function
If you want more simpler text output and do not need the advanced text position features of MoveTextPos use DrawText which is easier.
dX | the x offset relative to pos of BeginText or last MoveTextPos | |
dY | the y offset relative to pos of BeginText or last MoveTextPos |
void PoDoFo::PdfPainter::MoveTo | ( | double | dX, | |
double | dY | |||
) |
Begin a new path. Matches the PDF 'm' operator. This function is useful to construct an own path for drawing or clipping.
dX | x position | |
dY | y position |
void PoDoFo::PdfPainter::QuadCurveTo | ( | double | dX1, | |
double | dY1, | |||
double | dX3, | |||
double | dY3 | |||
) |
Append a quadratic bezier curve to the current path Matches the SVG 'Q' operator.
dX1 | x coordinate of the first control point | |
dY1 | y coordinate of the first control point | |
dX3 | x coordinate of the end point, which is the new current point | |
dY3 | y coordinate of the end point, which is the new current point |
void PoDoFo::PdfPainter::Restore | ( | ) |
void PoDoFo::PdfPainter::Save | ( | ) |
void PoDoFo::PdfPainter::SetClipRect | ( | const PdfRect & | rRect | ) | [inline] |
Set a clipping rectangle
rRect | rectangle |
void PoDoFo::PdfPainter::SetClipRect | ( | double | dX, | |
double | dY, | |||
double | dWidth, | |||
double | dHeight | |||
) |
Set a clipping rectangle
dX | x coordinate of the rectangle (left coordinate) | |
dY | y coordinate of the rectangle (bottom coordinate) | |
dWidth | width of the rectangle | |
dHeight | absolute height of the rectangle |
void PoDoFo::PdfPainter::SetColor | ( | const PdfColor & | rColor | ) |
void PoDoFo::PdfPainter::SetColor | ( | double | r, | |
double | g, | |||
double | b | |||
) |
Set the color for all following non-stroking operations in rgb colorspace. This operation used the 'rg' PDF operator.
This color is also used when drawing text.
r | red value in the range 0.0 - 1.0 | |
g | green value in the range 0.0 - 1.0 | |
b | blue value in the range 0.0 - 1.0 |
void PoDoFo::PdfPainter::SetColorCMYK | ( | double | c, | |
double | m, | |||
double | y, | |||
double | k | |||
) |
Set the color for all following non-stroking operations in cmyk colorspace. This operation used the 'k' PDF operator.
c | cyan value in the range 0.0 - 1.0 | |
m | magenta value in the range 0.0 - 1.0 | |
y | yellow value in the range 0.0 - 1.0 | |
k | black value in the range 0.0 - 1.0 |
void PoDoFo::PdfPainter::SetCurrentStrokingColor | ( | ) | [protected] |
void PoDoFo::PdfPainter::SetExtGState | ( | PdfExtGState * | inGState | ) |
Sets a specific PdfExtGState as being active
inGState | the specific ExtGState to set |
void PoDoFo::PdfPainter::SetFont | ( | PdfFont * | pFont | ) |
void PoDoFo::PdfPainter::SetGray | ( | double | g | ) |
Set the color for all following non-stroking operations in grayscale colorspace. This operation used the 'g' PDF operator.
g | gray scale value in the range 0.0 - 1.0 |
void PoDoFo::PdfPainter::SetLineCapStyle | ( | EPdfLineCapStyle | eCapStyle | ) |
Set the line cap style for all stroking operations.
eCapStyle | the cap style. |
void PoDoFo::PdfPainter::SetLineJoinStyle | ( | EPdfLineJoinStyle | eJoinStyle | ) |
Set the line join style for all stroking operations.
eJoinStyle | the join style. |
void PoDoFo::PdfPainter::SetPage | ( | PdfCanvas * | pPage | ) |
Set the page on which the painter should draw. The painter will draw of course on the pages contents object.
Calls FinishPage() on the last page if it was not yet called.
pPage | a PdfCanvas object (most likely a PdfPage or PdfXObject). |
void PoDoFo::PdfPainter::SetPrecision | ( | unsigned short | inPrec | ) | [inline] |
Set the floating point precision.
inPrec | write this many decimal places |
void PoDoFo::PdfPainter::SetRenderingIntent | ( | char * | intent | ) |
Sets a specific rendering intent
intent | the specific intent to set |
void PoDoFo::PdfPainter::SetShadingPattern | ( | const PdfShadingPattern & | rPattern | ) |
Set the shading pattern for all following non-stroking operations. This operation uses the 'scn' PDF operator.
rPattern | a shading pattern |
void PoDoFo::PdfPainter::SetStrokeStyle | ( | EPdfStrokeStyle | eStyle, | |
const char * | pszCustom = NULL | |||
) |
Set the stoke style for all stroking operations.
eStyle | style of the stroking operations | |
pszCustom | a custom stroking style which is used when eStyle == ePdfStrokeStyle_Custom. |
void PoDoFo::PdfPainter::SetStrokeWidth | ( | double | dWidth | ) |
Set the line width for all stroking operations.
dWidth | in PDF User Units. |
void PoDoFo::PdfPainter::SetStrokingColor | ( | const PdfColor & | rColor | ) |
void PoDoFo::PdfPainter::SetStrokingColor | ( | double | r, | |
double | g, | |||
double | b | |||
) |
Set the color for all following stroking operations in rgb colorspace. This operation used the 'RG' PDF operator.
r | red value in the range 0.0 - 1.0 | |
g | green value in the range 0.0 - 1.0 | |
b | blue value in the range 0.0 - 1.0 |
void PoDoFo::PdfPainter::SetStrokingColorCMYK | ( | double | c, | |
double | m, | |||
double | y, | |||
double | k | |||
) |
Set the color for all following stroking operations in cmyk colorspace. This operation used the 'K' PDF operator.
c | cyan value in the range 0.0 - 1.0 | |
m | magenta value in the range 0.0 - 1.0 | |
y | yellow value in the range 0.0 - 1.0 | |
k | black value in the range 0.0 - 1.0 |
void PoDoFo::PdfPainter::SetStrokingGray | ( | double | g | ) |
Set the color for all following stroking operations in grayscale colorspace. This operation used the 'G' PDF operator.
g | gray scale value in the range 0.0 - 1.0 |
void PoDoFo::PdfPainter::SetStrokingShadingPattern | ( | const PdfShadingPattern & | rPattern | ) |
Set the shading pattern for all following stroking operations. This operation uses the 'SCN' PDF operator.
rPattern | a shading pattern |
void PoDoFo::PdfPainter::SetTabWidth | ( | unsigned short | nTabWidth | ) | [inline] |
Set the tab width for the DrawText operation. Every tab '\t' is replaced with nTabWidth spaces before drawing text. Default is a value of 4
nTabWidth | replace every tabulator by this much spaces |
TabWidth
void PoDoFo::PdfPainter::SetTransformationMatrix | ( | double | a, | |
double | b, | |||
double | c, | |||
double | d, | |||
double | e, | |||
double | f | |||
) |
Set the transformation matrix for the current coordinate system See the operator 'cm' in PDF.
The six parameters are a standard 3x3 transformation matrix where the 3 left parameters are 0 0 1.
a | scale in x direction | |
b | rotation | |
c | rotation | |
d | scale in y direction | |
e | translate in x direction | |
f | translate in y direction |
void PoDoFo::PdfPainter::SmoothCurveTo | ( | double | dX2, | |
double | dY2, | |||
double | dX3, | |||
double | dY3 | |||
) |
Append a smooth bezier curve to the current path Matches the SVG 'S' operator.
dX2 | x coordinate of the second control point | |
dY2 | y coordinate of the second control point | |
dX3 | x coordinate of the end point, which is the new current point | |
dY3 | y coordinate of the end point, which is the new current point |
void PoDoFo::PdfPainter::SmoothQuadCurveTo | ( | double | dX3, | |
double | dY3 | |||
) |
Append a smooth quadratic bezier curve to the current path Matches the SVG 'T' operator.
dX3 | x coordinate of the end point, which is the new current point | |
dY3 | y coordinate of the end point, which is the new current point |
void PoDoFo::PdfPainter::Stroke | ( | ) |
Stroke the current path. Matches the PDF 'S' operator. This function is useful to construct an own path for drawing or clipping.
void PoDoFo::PdfPainter::VerticalLineTo | ( | double | dY | ) |
Append a vertical line to the current path Matches the SVG 'V' operator
dY | y coordinate to draw the line to |
PdfColor PoDoFo::PdfPainter::m_curColor [protected] |
Save the current color for non stroking colors
bool PoDoFo::PdfPainter::m_isTextOpen [protected] |
Is between BT and ET
unsigned short PoDoFo::PdfPainter::m_nTabWidth [protected] |
Every tab '\t' is replaced with m_nTabWidth spaces before drawing text. Default is a value of 4
std::ostringstream PoDoFo::PdfPainter::m_oss [protected] |
temporary stream buffer
PdfStream* PoDoFo::PdfPainter::m_pCanvas [protected] |
All drawing operations work on this stream. This object may not be NULL. If it is NULL any function accessing it should return ERROR_PDF_INVALID_HANDLE
PdfFont* PoDoFo::PdfPainter::m_pFont [protected] |
Font for all drawing operations
PdfCanvas* PoDoFo::PdfPainter::m_pPage [protected] |
The page object is needed so that fonts etc. can be added to the page resource dictionary as appropriate.