Ipelib
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ipe::PdfPainter Class Reference

#include <ipepdfwriter.h>

Inherits ipe::Painter.

Inherited by ipe::PsPainter.

Public Member Functions

 PdfPainter (const Cascade *style, Stream &stream)
 
virtual ~PdfPainter ()
 
- Public Member Functions inherited from ipe::Painter
 Painter (const Cascade *style)
 
virtual ~Painter ()
 
void setAttributeMap (const AttributeMap *map)
 
Attribute lookup (Kind kind, Attribute sym) const
 
void transform (const Matrix &m)
 
void untransform (TTransformations trans)
 
void translate (const Vector &v)
 
void push ()
 
void pop ()
 
void pushMatrix ()
 
void popMatrix ()
 
void newPath ()
 
void moveTo (const Vector &v)
 
void lineTo (const Vector &v)
 
void curveTo (const Vector &v1, const Vector &v2, const Vector &v3)
 
void curveTo (const Bezier &bezier)
 
void rect (const Rect &re)
 
void drawEllipse ()
 
void drawArc (const Arc &arc)
 
void closePath ()
 
void drawPath (TPathMode mode)
 
void drawBitmap (Bitmap bitmap)
 
void drawText (const Text *text)
 
void drawSymbol (Attribute symbol)
 
void addClipPath ()
 
void setStroke (Attribute color)
 
void setFill (Attribute color)
 
void setPen (Attribute pen)
 
void setDashStyle (Attribute dash)
 
void setLineCap (TLineCap cap)
 
void setLineJoin (TLineJoin join)
 
void setFillRule (TFillRule rule)
 
void setSymStroke (Attribute color)
 
void setSymFill (Attribute color)
 
void setSymPen (Attribute wid)
 
void setOpacity (Attribute opaq)
 
void setStrokeOpacity (Attribute opaq)
 
void setTiling (Attribute til)
 
void setGradient (Attribute grad)
 
const Cascadecascade () const
 
Color stroke () const
 
Color fill () const
 
const Matrixmatrix () const
 
Fixed pen () const
 
String dashStyle () const
 
void dashStyle (std::vector< double > &dashes, double &offset) const
 
TLineCap lineCap () const
 
TLineJoin lineJoin () const
 
TFillRule fillRule () const
 
Color symStroke () const
 
Color symFill () const
 
Fixed symPen () const
 
Fixed opacity () const
 
Fixed strokeOpacity () const
 
Attribute tiling () const
 
Attribute gradient () const
 
const Statestate () const
 
void setState (const State &state)
 

Static Public Member Functions

static void drawColor (Stream &stream, Color color, const char *gray, const char *rgb)
 

Protected Member Functions

virtual void doPush ()
 
virtual void doPop ()
 
virtual void doNewPath ()
 
virtual void doMoveTo (const Vector &v)
 
virtual void doLineTo (const Vector &v)
 
virtual void doCurveTo (const Vector &v1, const Vector &v2, const Vector &v3)
 
virtual void doClosePath ()
 
virtual void doDrawPath (TPathMode mode)
 
virtual void doDrawBitmap (Bitmap bitmap)
 
virtual void doDrawText (const Text *text)
 
virtual void doAddClipPath ()
 
virtual void doDrawSymbol (Attribute symbol)
 
void drawAttributes ()
 
void drawOpacity (bool withStroke)
 
- Protected Member Functions inherited from ipe::Painter
virtual void doDrawArc (const Arc &arc)
 
void drawArcAsBezier (double alpha)
 

Protected Attributes

StreamiStream
 
std::list< StateiActiveState
 
- Protected Attributes inherited from ipe::Painter
std::list< StateiState
 
std::list< MatrixiMatrix
 
const CascadeiCascade
 
const AttributeMapiAttributeMap
 
int iInPath
 

Constructor & Destructor Documentation

◆ PdfPainter()

PdfPainter::PdfPainter ( const Cascade style,
Stream stream 
)

◆ ~PdfPainter()

virtual ipe::PdfPainter::~PdfPainter ( )
inlinevirtual

Member Function Documentation

◆ drawColor()

void PdfPainter::drawColor ( Stream stream,
Color  color,
const char *  gray,
const char *  rgb 
)
static

References ipe::Color::iRed, and ipe::Color::isGray().

Referenced by drawAttributes().

◆ doPush()

void PdfPainter::doPush ( )
protectedvirtual

Perform graphics state push on output medium.

Reimplemented from ipe::Painter.

References iActiveState, iStream, and ipe::Painter::state().

◆ doPop()

void PdfPainter::doPop ( )
protectedvirtual

Perform graphics state pop on output medium.

Reimplemented from ipe::Painter.

References iActiveState, and iStream.

◆ doNewPath()

void PdfPainter::doNewPath ( )
protectedvirtual

Perform new path operator.

Reimplemented from ipe::Painter.

Reimplemented in ipe::PsPainter.

References drawAttributes().

◆ doMoveTo()

void PdfPainter::doMoveTo ( const Vector v)
protectedvirtual

Perform moveto operator.

The transformation matrix has already been applied.

Reimplemented from ipe::Painter.

References iStream.

◆ doLineTo()

void PdfPainter::doLineTo ( const Vector v)
protectedvirtual

Perform lineto operator.

The transformation matrix has already been applied.

Reimplemented from ipe::Painter.

References iStream.

◆ doCurveTo()

void PdfPainter::doCurveTo ( const Vector v1,
const Vector v2,
const Vector v3 
)
protectedvirtual

Perform curveto operator.

The transformation matrix has already been applied.

Reimplemented from ipe::Painter.

References iStream.

◆ doClosePath()

void PdfPainter::doClosePath ( )
protectedvirtual

Perform closepath operator.

Reimplemented from ipe::Painter.

References iStream.

◆ doDrawPath()

void PdfPainter::doDrawPath ( TPathMode  mode)
protectedvirtual

◆ doDrawBitmap()

void PdfPainter::doDrawBitmap ( Bitmap  bitmap)
protectedvirtual

Draw a bitmap.

Reimplemented from ipe::Painter.

Reimplemented in ipe::PsPainter.

References drawOpacity(), iStream, ipe::Painter::matrix(), and ipe::Bitmap::objNum().

◆ doDrawText()

void PdfPainter::doDrawText ( const Text text)
protectedvirtual

◆ doAddClipPath()

void PdfPainter::doAddClipPath ( )
protectedvirtual

Add a clip path.

Reimplemented from ipe::Painter.

Reimplemented in ipe::PsPainter.

References iStream.

◆ doDrawSymbol()

void PdfPainter::doDrawSymbol ( Attribute  symbol)
protectedvirtual

Draw a symbol.

The default implementation calls the draw method of the object. Only PDF drawing overrides this to reuse a PDF XForm.

Reimplemented from ipe::Painter.

References ipe::Painter::cascade(), ipe::Object::draw(), ipe::Cascade::findSymbol(), ipe::Attribute::index(), ipe::Symbol::iObject, iStream, and ipe::Symbol::iXForm.

◆ drawAttributes()

void PdfPainter::drawAttributes ( )
protected

◆ drawOpacity()

void PdfPainter::drawOpacity ( bool  withStroke)
protected

Member Data Documentation

◆ iStream

Stream& ipe::PdfPainter::iStream
protected

◆ iActiveState

std::list<State> ipe::PdfPainter::iActiveState
protected

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