Ipelib
Classes | Public Member Functions | Protected Member Functions | List of all members
ipe::CairoPainter Class Reference

#include <ipecairopainter.h>

Inherits ipe::Painter.

Public Member Functions

 CairoPainter (const Cascade *sheet, Fonts *fonts, cairo_t *cc, double zoom, bool pretty, bool filterBest)
 
virtual ~CairoPainter ()
 
void setDimmed (bool dim)
 
void executeStream (const PdfDict *stream, const PdfDict *resources)
 
bool type3Font () const
 
- 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)
 

Protected Member Functions

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

Additional Inherited Members

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

Detailed Description

Ipe Painter using Cairo and Freetype as a backend.

This painter draws to a Cairo surface.

Constructor & Destructor Documentation

◆ CairoPainter()

CairoPainter::CairoPainter ( const Cascade sheet,
Fonts fonts,
cairo_t *  cc,
double  zoom,
bool  pretty,
bool  filterBest 
)

Construct a painter.

zoom one means 72 pixels per inch. Set pretty to true to avoid drawing text without Latex.

◆ ~CairoPainter()

virtual ipe::CairoPainter::~CairoPainter ( )
inlinevirtual

Member Function Documentation

◆ setDimmed()

void ipe::CairoPainter::setDimmed ( bool  dim)
inline

◆ executeStream()

void CairoPainter::executeStream ( const PdfDict stream,
const PdfDict resources 
)

◆ type3Font()

bool ipe::CairoPainter::type3Font ( ) const
inline

◆ doPush()

void CairoPainter::doPush ( )
overrideprotectedvirtual

Perform graphics state push on output medium.

Reimplemented from ipe::Painter.

◆ doPop()

void CairoPainter::doPop ( )
overrideprotectedvirtual

Perform graphics state pop on output medium.

Reimplemented from ipe::Painter.

◆ doMoveTo()

void CairoPainter::doMoveTo ( const Vector v)
overrideprotectedvirtual

Perform moveto operator.

The transformation matrix has already been applied.

Reimplemented from ipe::Painter.

References ipe::Vector::x, and ipe::Vector::y.

◆ doLineTo()

void CairoPainter::doLineTo ( const Vector v)
overrideprotectedvirtual

Perform lineto operator.

The transformation matrix has already been applied.

Reimplemented from ipe::Painter.

References ipe::Vector::x, and ipe::Vector::y.

◆ doCurveTo()

void CairoPainter::doCurveTo ( const Vector v1,
const Vector v2,
const Vector v3 
)
overrideprotectedvirtual

Perform curveto operator.

The transformation matrix has already been applied.

Reimplemented from ipe::Painter.

References ipe::Vector::x, and ipe::Vector::y.

◆ doClosePath()

void CairoPainter::doClosePath ( )
overrideprotectedvirtual

Perform closepath operator.

Reimplemented from ipe::Painter.

◆ doDrawArc()

void CairoPainter::doDrawArc ( const Arc arc)
overrideprotectedvirtual

Draw an elliptic arc.

The default implementations calls drawArcAsBezier(). The transformation matrix has not yet been applied to arc.

Reimplemented from ipe::Painter.

References ipe::Arc::iAlpha, ipe::Arc::iBeta, ipe::Arc::iM, ipe::Arc::isEllipse(), and ipe::Painter::matrix().

◆ doAddClipPath()

void CairoPainter::doAddClipPath ( )
overrideprotectedvirtual

Add a clip path.

Reimplemented from ipe::Painter.

◆ doDrawPath()

void CairoPainter::doDrawPath ( TPathMode  mode)
overrideprotectedvirtual

◆ doDrawBitmap()

void CairoPainter::doDrawBitmap ( Bitmap  bitmap)
overrideprotectedvirtual

◆ doDrawText()

void CairoPainter::doDrawText ( const Text text)
overrideprotectedvirtual

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