18#ifndef QGSDXFPAINTENGINE_H
19#define QGSDXFPAINTENGINE_H
25#include <QPaintEngine>
26#include <QPainterPath>
47 bool begin( QPaintDevice *pdev )
override;
49 QPaintEngine::Type
type()
const override;
50 void updateState(
const QPaintEngineState &state )
override;
52 void drawPixmap(
const QRectF &r,
const QPixmap &pm,
const QRectF &sr )
override;
54 void drawPolygon(
const QPointF *points,
int pointCount, PolygonDrawMode mode )
override;
55 void drawPath(
const QPainterPath &path )
override;
56 void drawLines(
const QLineF *lines,
int lineCount )
override;
59 QString
layer()
const {
return mLayer; }
61 void setShift( QPointF shift ) { mShift = shift; }
68 QTransform mTransform;
72 double mOpacity = 1.0;
76 QPolygonF mCurrentPolygon;
77 QList<QPointF> mCurrentCurve;
79 QgsPoint toDxfCoordinates( QPointF pt )
const;
80 double currentWidth()
const;
82 void moveTo(
double dx,
double dy );
83 void lineTo(
double dx,
double dy );
84 void curveTo(
double dx,
double dy );
88 void setRing(
QgsPointSequence &polyline,
const QPointF *points,
int pointCount );
91 static QPointF bezierPoint(
const QList<QPointF> &controlPolygon,
double t );
92 static double bernsteinPoly(
int n,
int i,
double t );
93 static int lower(
int n,
int i );
94 static double power(
double a,
int b );
95 static int faculty(
int n );
98 QColor penColor()
const;
100 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