18 #ifndef QGSDXFPAINTENGINE_H
19 #define QGSDXFPAINTENGINE_H
21 #include <QPaintEngine>
33 bool begin( QPaintDevice* pdev );
35 QPaintEngine::Type type()
const;
36 void updateState(
const QPaintEngineState& state );
38 void drawPixmap(
const QRectF& r,
const QPixmap& pm,
const QRectF& sr );
40 void drawPolygon(
const QPointF * points,
int pointCount, PolygonDrawMode mode );
41 void drawRects(
const QRectF * rects,
int rectCount );
42 void drawPath(
const QPainterPath& path );
43 void drawLines(
const QLineF* lines,
int lineCount );
45 void setLayer(
const QString& layer ) { mLayer = layer; }
46 QString
layer()
const {
return mLayer; }
48 void setShift(
const QPointF& shift ) { mShift = shift; }
55 QTransform mTransform;
60 QPolygonF mCurrentPolygon;
61 QList<QPointF> mCurrentCurve;
63 QgsPoint toDxfCoordinates(
const QPointF& pt )
const;
64 QColor currentColor()
const;
65 double currentWidth()
const;
67 void moveTo(
double dx,
double dy );
68 void lineTo(
double dx,
double dy );
69 void curveTo(
double dx,
double dy );
74 static QPointF bezierPoint(
const QList<QPointF>& controlPolygon,
double t );
75 static double bernsteinPoly(
int n,
int i,
double t );
76 static int lower(
int n,
int i );
77 static double power(
double a,
int b );
81 #endif // QGSDXFPAINTENGINE_H