18 #ifndef QGSDXFPAINTENGINE_H
19 #define QGSDXFPAINTENGINE_H
23 #include "qgis_core.h"
24 #include <QPaintEngine>
25 #include <QPainterPath>
44 bool begin( QPaintDevice *pdev )
override;
46 QPaintEngine::Type type()
const override;
47 void updateState(
const QPaintEngineState &state )
override;
49 void drawPixmap(
const QRectF &r,
const QPixmap &pm,
const QRectF &sr )
override;
51 void drawPolygon(
const QPointF *points,
int pointCount, PolygonDrawMode mode )
override;
52 void drawPath(
const QPainterPath &path )
override;
53 void drawLines(
const QLineF *lines,
int lineCount )
override;
55 void setLayer(
const QString &layer ) { mLayer = layer; }
56 QString
layer()
const {
return mLayer; }
58 void setShift( QPointF shift ) { mShift = shift; }
65 QTransform mTransform;
69 double mOpacity = 1.0;
73 QPolygonF mCurrentPolygon;
74 QList<QPointF> mCurrentCurve;
76 QgsPoint toDxfCoordinates( QPointF pt )
const;
77 double currentWidth()
const;
79 void moveTo(
double dx,
double dy );
80 void lineTo(
double dx,
double dy );
81 void curveTo(
double dx,
double dy );
85 void setRing(
QgsPointSequence &polyline,
const QPointF *points,
int pointCount );
88 static QPointF bezierPoint(
const QList<QPointF> &controlPolygon,
double t );
89 static double bernsteinPoly(
int n,
int i,
double t );
90 static int lower(
int n,
int i );
91 static double power(
double a,
int b );
95 QColor penColor()
const;
97 QColor brushColor()
const;
100 #endif // QGSDXFPAINTENGINE_H