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 | 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 Cascade * | cascade () const
Color | stroke () const
Color | fill () const
const Matrix & | matrix () 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 State & | state () 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
Stream & | iStream
std::list< State > | iActiveState
Protected Attributes inherited from ipe::Painter
std::list< State > | iState
std::list< Matrix > | iMatrix
const Cascade * | iCascade
int | iInPath

## Constructor & Destructor Documentation

## ◆ PdfPainter()

PdfPainter::PdfPainter | ( | const Cascade * | style,
|  | Stream & | stream
| ) |  |

References iActiveState, ipe::Painter::State::iDashStyle, ipe::Painter::State::iFill, ipe::Painter::State::iLineCap, ipe::Painter::State::iLineJoin, ipe::Painter::State::iOpacity, ipe::Painter::State::iPen, iStream, ipe::Painter::State::iStroke, ipe::Painter::State::iStrokeOpacity, ipe::Cascade::lineCap(), ipe::Cascade::lineJoin(), and ipe::Painter::state().

## ◆ ~PdfPainter()

virtual ipe::PdfPainter::~PdfPainter | ( |  | ) |
| inline virtual

References doAddClipPath(), doClosePath(), doCurveTo(), doDrawBitmap(), doDrawPath(), doDrawSymbol(), doDrawText(), doLineTo(), doMoveTo(), doNewPath(), doPop(), doPush(), drawAttributes(), drawColor(), and drawOpacity().

## 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(), and ~PdfPainter().

## ◆ doPush()

void PdfPainter::doPush | ( |  | ) |
| protected virtual

Perform graphics state push on output medium.

Reimplemented from ipe::Painter.

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

Referenced by ~PdfPainter().

## ◆ doPop()

void PdfPainter::doPop | ( |  | ) |
| protected virtual

Perform graphics state pop on output medium.

Reimplemented from ipe::Painter.

References iActiveState, and iStream.

Referenced by ~PdfPainter().

## ◆ doNewPath()

void PdfPainter::doNewPath | ( |  | ) |
| protected virtual

Perform new path operator.

Reimplemented from ipe::Painter.

Reimplemented in ipe::PsPainter.

References drawAttributes().

Referenced by ~PdfPainter().

## ◆ doMoveTo()

void PdfPainter::doMoveTo | ( | const Vector & | v | ) |
| protected virtual

Perform moveto operator.

The transformation matrix has already been applied.

Reimplemented from ipe::Painter.

References iStream.

Referenced by ~PdfPainter().

## ◆ doLineTo()

void PdfPainter::doLineTo | ( | const Vector & | v | ) |
| protected virtual

Perform lineto operator.

The transformation matrix has already been applied.

Reimplemented from ipe::Painter.

References iStream.

Referenced by ~PdfPainter().

## ◆ doCurveTo()

void PdfPainter::doCurveTo | ( | const Vector & | v1,
|  | const Vector & | v2,
|  | const Vector & | v3
| ) |  |
| protected virtual

Perform curveto operator.

The transformation matrix has already been applied.

Reimplemented from ipe::Painter.

References iStream.

Referenced by ~PdfPainter().

## ◆ doClosePath()

void PdfPainter::doClosePath | ( |  | ) |
| protected virtual

Perform closepath operator.

Reimplemented from ipe::Painter.

References iStream.

Referenced by ~PdfPainter().

## ◆ doDrawPath()

void PdfPainter::doDrawPath | ( | TPathMode | mode | ) |
| protected virtual

Actually draw the path.

Reimplemented from ipe::Painter.

Reimplemented in ipe::PsPainter.

References ipe::EEvenOddRule, ipe::EFilledOnly, ipe::EStrokedOnly, ipe::Painter::fillRule(), ipe::Cascade::findGradient(), ipe::Painter::iCascade, ipe::Gradient::iMatrix, ipe::Attribute::index(), ipe::Attribute::isNormal(), ipe::Painter::iState, iStream, and ipe::Painter::matrix().

Referenced by ~PdfPainter().

## ◆ doDrawBitmap()

void PdfPainter::doDrawBitmap | ( | Bitmap | bitmap | ) |
| protected virtual

Draw a bitmap.

Reimplemented from ipe::Painter.

Reimplemented in ipe::PsPainter.

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

Referenced by ~PdfPainter().

## ◆ doDrawText()

void PdfPainter::doDrawText | ( | const Text * | text | ) |
| protected virtual

Draw a text object.

Reimplemented from ipe::Painter.

References drawOpacity(), ipe::Text::getXForm(), ipe::Text::XForm::iName, iStream, ipe::Text::XForm::iStretch, ipe::Text::XForm::iTranslation, ipe::Painter::matrix(), ipe::Painter::popMatrix(), ipe::Painter::pushMatrix(), ipe::Painter::transform(), and ipe::Painter::translate().

Referenced by ~PdfPainter().

## ◆ doAddClipPath()

void PdfPainter::doAddClipPath | ( |  | ) |
| protected virtual

Add a clip path.

Reimplemented from ipe::Painter.

Reimplemented in ipe::PsPainter.

References iStream.

Referenced by ~PdfPainter().

## ◆ doDrawSymbol()

void PdfPainter::doDrawSymbol | ( | Attribute | symbol | ) |
| protected virtual

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::Object::accept(), ipe::Painter::cascade(), ipe::String::data(), ipe::Object::draw(), ipe::Gradient::EAxial, ipe::EGradient, ipe::EOpacity, ipe::ESymbol, ipe::ETiling, ipe::Cascade::findSymbol(), ipe::Tiling::iAngle, ipe::BitmapFinder::iBitmaps, ipe::Gradient::iExtend, ipe::Attribute::index(), ipe::Symbol::iObject, ipe::Gradient::iRadius, ipe::Attribute::isNumber(), ipe::Tiling::iStep, ipe::Gradient::iStops, iStream, ipe::Gradient::iType, ipe::Gradient::iV, ipe::Tiling::iWidth, ipe::Symbol::iXForm, ipe::Attribute::number(), ipe::PdfWriter::PdfWriter(), ipe::size(), ipe::String::size(), and ipe::Painter::tiling().

Referenced by ~PdfPainter().

## ◆ drawAttributes()

void PdfPainter::drawAttributes | ( |  | ) |
| protected

References drawColor(), drawOpacity(), iActiveState, ipe::Painter::State::iDashStyle, ipe::Painter::State::iFill, ipe::Painter::State::iLineCap, ipe::Painter::State::iLineJoin, ipe::Attribute::index(), ipe::Fixed::internal(), ipe::Painter::State::iPen, ipe::Attribute::isNormal(), ipe::Painter::iState, iStream, ipe::Painter::State::iStroke, ipe::Painter::State::iTiling, and ipe::Color::saveRGB().

Referenced by doNewPath(), and ~PdfPainter().

## ◆ drawOpacity()

void PdfPainter::drawOpacity | ( | bool | withStroke | ) |
| protected

References iActiveState, ipe::Painter::State::iOpacity, ipe::Painter::iState, iStream, and ipe::Painter::State::iStrokeOpacity.

Referenced by doDrawBitmap(), doDrawText(), drawAttributes(), and ~PdfPainter().

## Member Data Documentation

## ◆ iStream

Stream& ipe::PdfPainter::iStream
| protected

Referenced by ipe::PdfWriter::createBookmarks(), ipe::PdfWriter::createNamedDests(), ipe::PdfWriter::createPageView(), ipe::PdfWriter::createTrailer(), ipe::PdfWriter::createXmlStream(), doAddClipPath(), doClosePath(), doCurveTo(), doDrawBitmap(), doDrawPath(), doDrawSymbol(), doDrawText(), doLineTo(), doMoveTo(), doPop(), doPush(), drawAttributes(), drawOpacity(), PdfPainter(), and ipe::PdfWriter::~PdfWriter().

## ◆ iActiveState

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

Referenced by doPop(), doPush(), drawAttributes(), drawOpacity(), and PdfPainter().

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

- ipepdfwriter.h
- ipepdfwriter.cpp