PoDoFo  0.9.1
Public Member Functions
PoDoFo::PdfPainterMM Class Reference

#include <PdfPainterMM.h>

Inheritance diagram for PoDoFo::PdfPainterMM:
PoDoFo::PdfPainter

List of all members.

Public Member Functions

 PdfPainterMM ()
void SetStrokeWidthMM (long lWidth)
void DrawLineMM (long lStartX, long lStartY, long lEndX, long lEndY)
void DrawRectMM (long lX, long lY, long lWidth, long lHeight)
void FillRectMM (long lX, long lY, long lWidth, long lHeight)
void DrawEllipseMM (long lX, long lY, long lWidth, long lHeight)
void FillEllipseMM (long lX, long lY, long lWidth, long lHeight)
void DrawTextMM (long lX, long lY, const PdfString &sText)
void DrawTextMM (long lX, long lY, const PdfString &sText, long lLen)
void DrawImageMM (long lX, long lY, PdfImage *pObject, double dScaleX=1.0, double dScaleY=1.0)
void DrawXObjectMM (long lX, long lY, PdfXObject *pObject, double dScaleX=1.0, double dScaleY=1.0)
void LineToMM (long lX, long lY)
void MoveToMM (long lX, long lY)

Detailed Description

This class provides an easy to use painter object which allows you to draw on a PDF page object.

During all drawing operations, you are still able to access the stream of the object you are drawing on directly.

This painter takes all coordinates in 1/1000th mm instead of PDF units.

Developer note: we use ownership rather than inheritance here, so as to use the same methods names a PdfPainter AND avoid compiler confusion on picking the right one.

See also:
PdfPainter

Constructor & Destructor Documentation

Create a new PdfPainterMM object.


Member Function Documentation

void PoDoFo::PdfPainterMM::DrawEllipseMM ( long  lX,
long  lY,
long  lWidth,
long  lHeight 
) [inline]

Draw an ellipse with the current stroking settings

Parameters:
lXx coordinate of the ellipse (left coordinate)
lYy coordinate of the ellipse (top coordinate)
lWidthwidth of the ellipse
lHeightabsolute height of the ellipse
void PoDoFo::PdfPainterMM::DrawImageMM ( long  lX,
long  lY,
PdfImage pObject,
double  dScaleX = 1.0,
double  dScaleY = 1.0 
) [inline]

Draw an image on the current page.

Parameters:
lXthe x coordinate (bottom left position of the image)
lYthe y coordinate (bottom position of the image)
pObjectan PdfXObject
dScaleXoption scaling factor in x direction
dScaleYoption scaling factor in y direction
void PoDoFo::PdfPainterMM::DrawLineMM ( long  lStartX,
long  lStartY,
long  lEndX,
long  lEndY 
) [inline]

Draw a line with the current color and line settings.

Parameters:
lStartXx coordinate of the starting point
lStartYy coordinate of the starting point
lEndXx coordinate of the ending point
lEndYy coordinate of the ending point
void PoDoFo::PdfPainterMM::DrawRectMM ( long  lX,
long  lY,
long  lWidth,
long  lHeight 
) [inline]

Draw a rectangle with the current stroking settings

Parameters:
lXx coordinate of the rectangle
lYy coordinate of the rectangle
lWidthwidth of the rectangle
lHeightabsolute height of the rectangle
void PoDoFo::PdfPainterMM::DrawTextMM ( long  lX,
long  lY,
const PdfString sText 
) [inline]

Draw a text string on a page using a given font object. You have to call SetFont before calling this function.

Parameters:
lXthe x coordinate
lYthe y coordinate
sTextthe text string which should be printed
See also:
PdfPainter::SetFont()
void PoDoFo::PdfPainterMM::DrawTextMM ( long  lX,
long  lY,
const PdfString sText,
long  lLen 
) [inline]

Draw a text string on a page using a given font object. You have to call SetFont before calling this function.

Parameters:
lXthe x coordinate
lYthe y coordinate
sTextthe text string which should be printed (is not allowed to be NULL!)
lLendraw only lLen characters of pszText
See also:
PdfPainter::SetFont()
void PoDoFo::PdfPainterMM::DrawXObjectMM ( long  lX,
long  lY,
PdfXObject pObject,
double  dScaleX = 1.0,
double  dScaleY = 1.0 
) [inline]

Draw an XObject on the current page.

Parameters:
lXthe x coordinate (bottom left position of the XObject)
lYthe y coordinate (bottom position of the XObject)
pObjectan PdfXObject
dScaleXoption scaling factor in x direction
dScaleYoption scaling factor in y direction
void PoDoFo::PdfPainterMM::FillEllipseMM ( long  lX,
long  lY,
long  lWidth,
long  lHeight 
) [inline]

Fill an ellipse with the current fill settings

Parameters:
lXx coordinate of the ellipse (left coordinate)
lYy coordinate of the ellipse (top coordinate)
lWidthwidth of the ellipse
lHeightabsolute height of the ellipse
void PoDoFo::PdfPainterMM::FillRectMM ( long  lX,
long  lY,
long  lWidth,
long  lHeight 
) [inline]

Fill a rectangle with the current fill settings

Parameters:
lXx coordinate of the rectangle
lYy coordinate of the rectangle
lWidthwidth of the rectangle
lHeightabsolute height of the rectangle
void PoDoFo::PdfPainterMM::LineToMM ( long  lX,
long  lY 
) [inline]

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.

Parameters:
lXx position
lYy position
void PoDoFo::PdfPainterMM::MoveToMM ( long  lX,
long  lY 
) [inline]

Begin a new path. Matches the PDF 'm' operator. This function is useful to construct an own path for drawing or clipping.

Parameters:
lXx position
lYy position
void PoDoFo::PdfPainterMM::SetStrokeWidthMM ( long  lWidth) [inline]

Set the line width for all stroking operations.

Parameters:
lWidthin 1/1000th mm