Ipelib
|
#include <ipeutils.h>
Inherits ipe::Painter.
Public Member Functions | |
BBoxPainter (const Cascade *style) | |
Rect | bbox () 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 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) |
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 | doDrawPath (TPathMode mode) |
virtual void | doDrawBitmap (Bitmap bitmap) |
virtual void | doDrawText (const Text *text) |
virtual void | doAddClipPath () |
Protected Member Functions inherited from ipe::Painter | |
virtual void | doDrawArc (const Arc &arc) |
virtual void | doClosePath () |
virtual void | doDrawSymbol (Attribute symbol) |
void | drawArcAsBezier (double alpha) |
Additional Inherited Members | |
Protected Attributes inherited from ipe::Painter | |
std::list< State > | iState |
std::list< Matrix > | iMatrix |
const Cascade * | iCascade |
const AttributeMap * | iAttributeMap |
int | iInPath |
Paint objects using this painter to compute an accurate bounding box.
The Object::bbox member function computes a bounding box useful for distance calculations and optimizations. To find a bounding box that is accurate for the actual drawn object, paint the object using a BBoxPainter, and retrieve the box with bbox.
BBoxPainter::BBoxPainter | ( | const Cascade * | style | ) |
|
inline |
Referenced by ipe::Page::pageBBox(), ipe::PdfWriter::PdfWriter(), and ipe::Page::viewBBox().
|
protectedvirtual |
Perform graphics state push on output medium.
Reimplemented from ipe::Painter.
|
protectedvirtual |
Perform graphics state pop on output medium.
Reimplemented from ipe::Painter.
|
protectedvirtual |
|
protectedvirtual |
Perform moveto operator.
The transformation matrix has already been applied.
Reimplemented from ipe::Painter.
References ipe::Rect::addPoint().
|
protectedvirtual |
Perform lineto operator.
The transformation matrix has already been applied.
Reimplemented from ipe::Painter.
References ipe::Rect::addPoint().
|
protectedvirtual |
Perform curveto operator.
The transformation matrix has already been applied.
Reimplemented from ipe::Painter.
References ipe::Rect::addPoint(), ipe::Bezier::bbox(), ipe::Rect::bottomLeft(), and ipe::Rect::topRight().
|
protectedvirtual |
Actually draw the path.
Reimplemented from ipe::Painter.
References ipe::Rect::addPoint(), ipe::Rect::bottomLeft(), ipe::Rect::clipTo(), ipe::Rect::isEmpty(), ipe::Painter::pen(), ipe::Fixed::toDouble(), and ipe::Rect::topRight().
|
protectedvirtual |
Draw a bitmap.
Reimplemented from ipe::Painter.
References ipe::Rect::addPoint(), ipe::Rect::addRect(), ipe::Rect::clipTo(), and ipe::Painter::matrix().
|
protectedvirtual |
Draw a text object.
Reimplemented from ipe::Painter.
References ipe::Rect::addPoint(), ipe::Rect::addRect(), ipe::Rect::bottomLeft(), ipe::Painter::cascade(), ipe::Rect::clipTo(), ipe::Cascade::findTextPadding(), ipe::TextPadding::iBottom, ipe::TextPadding::iLeft, ipe::TextPadding::iRight, ipe::TextPadding::iTop, ipe::Painter::matrix(), ipe::Rect::topRight(), ipe::Text::totalHeight(), and ipe::Text::width().
|
protectedvirtual |
Add a clip path.
Reimplemented from ipe::Painter.