18 #ifndef QGSDXFPAINTENGINE_H
19 #define QGSDXFPAINTENGINE_H
23 #include "qgis_core.h"
24 #include <QPaintEngine>
25 #include <QPainterPath>
45 bool begin( QPaintDevice *pdev )
override;
47 QPaintEngine::Type type()
const override;
48 void updateState(
const QPaintEngineState &state )
override;
50 void drawPixmap(
const QRectF &r,
const QPixmap &pm,
const QRectF &sr )
override;
52 void drawPolygon(
const QPointF *points,
int pointCount, PolygonDrawMode mode )
override;
53 void drawPath(
const QPainterPath &path )
override;
54 void drawLines(
const QLineF *lines,
int lineCount )
override;
56 void setLayer(
const QString &layer ) { mLayer = layer; }
57 QString
layer()
const {
return mLayer; }
59 void setShift( QPointF shift ) { mShift = shift; }
66 QTransform mTransform;
70 double mOpacity = 1.0;
74 QPolygonF mCurrentPolygon;
75 QList<QPointF> mCurrentCurve;
77 QgsPoint toDxfCoordinates( QPointF pt )
const;
78 double currentWidth()
const;
80 void moveTo(
double dx,
double dy );
81 void lineTo(
double dx,
double dy );
82 void curveTo(
double dx,
double dy );
86 void setRing(
QgsPointSequence &polyline,
const QPointF *points,
int pointCount );
89 static QPointF bezierPoint(
const QList<QPointF> &controlPolygon,
double t );
90 static double bernsteinPoly(
int n,
int i,
double t );
91 static int lower(
int n,
int i );
92 static double power(
double a,
int b );
96 QColor penColor()
const;
98 QColor brushColor()
const;
Exports QGIS layers to the DXF format.
A paint device for drawing into dxf files.
Custom paint engine for rendering to DXF drawings.
void setShift(QPointF shift)
void setLayer(const QString &layer)
Point geometry type, with support for z-dimension and m-values.
int ANALYSIS_EXPORT faculty(int n)
Faculty function.
int ANALYSIS_EXPORT lower(int n, int i)
Lower function.
QVector< QgsPointSequence > QgsRingSequence
QVector< QgsPoint > QgsPointSequence