18#ifndef QGSDXFPAINTENGINE_H
19#define QGSDXFPAINTENGINE_H
26#include <QPaintEngine>
27#include <QPainterPath>
46 bool begin( QPaintDevice *pdev )
override;
48 QPaintEngine::Type
type()
const override;
49 void updateState(
const QPaintEngineState &state )
override;
51 void drawPixmap(
const QRectF &r,
const QPixmap &pm,
const QRectF &sr )
override;
53 void drawPolygon(
const QPointF *points,
int pointCount, PolygonDrawMode mode )
override;
54 void drawPath(
const QPainterPath &path )
override;
55 void drawLines(
const QLineF *lines,
int lineCount )
override;
58 QString
layer()
const {
return mLayer; }
60 void setShift( QPointF shift ) { mShift = shift; }
67 QTransform mTransform;
71 double mOpacity = 1.0;
75 QPolygonF mCurrentPolygon;
76 QList<QPointF> mCurrentCurve;
78 QgsPoint toDxfCoordinates( QPointF pt )
const;
79 double currentWidth()
const;
81 void moveTo(
double dx,
double dy );
82 void lineTo(
double dx,
double dy );
83 void curveTo(
double dx,
double dy );
87 void setRing(
QgsPointSequence &polyline,
const QPointF *points,
int pointCount );
90 static QPointF bezierPoint(
const QList<QPointF> &controlPolygon,
double t );
91 static double bernsteinPoly(
int n,
int i,
double t );
92 static int lower(
int n,
int i );
93 static double power(
double a,
int b );
94 static int faculty(
int n );
97 QColor penColor()
const;
99 QColor brushColor()
const;
Exports QGIS layers to the DXF format.
A paint device for drawing into dxf files.
void setShift(QPointF shift)
void drawPath(const QPainterPath &path) override
bool begin(QPaintDevice *pdev) override
QgsDxfPaintEngine(const QgsDxfPaintDevice *dxfDevice, QgsDxfExport *dxf)
void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr) override
void updateState(const QPaintEngineState &state) override
void setLayer(const QString &layer)
void drawLines(const QLineF *lines, int lineCount) override
QPaintEngine::Type type() const override
void drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode) override
Point geometry type, with support for z-dimension and m-values.
QVector< QgsPointSequence > QgsRingSequence
QVector< QgsPoint > QgsPointSequence