18 #ifndef QGSDXFPAINTENGINE_H
19 #define QGSDXFPAINTENGINE_H
21 #include <QPaintEngine>
33 bool begin( QPaintDevice* pdev )
override;
35 QPaintEngine::Type type()
const override;
36 void updateState(
const QPaintEngineState& state )
override;
38 void drawPixmap(
const QRectF& r,
const QPixmap& pm,
const QRectF& sr )
override;
40 void drawPolygon(
const QPointF * points,
int pointCount, PolygonDrawMode mode )
override;
41 void drawRects(
const QRectF * rects,
int rectCount )
override;
42 void drawPath(
const QPainterPath& path )
override;
43 void drawLines(
const QLineF* lines,
int lineCount )
override;
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 double currentWidth()
const;
66 void moveTo(
double dx,
double dy );
67 void lineTo(
double dx,
double dy );
68 void curveTo(
double dx,
double dy );
73 static QPointF bezierPoint(
const QList<QPointF>& controlPolygon,
double t );
74 static double bernsteinPoly(
int n,
int i,
double t );
75 static int lower(
int n,
int i );
76 static double power(
double a,
int b );
80 #endif // QGSDXFPAINTENGINE_H