18 #ifndef QGSDXFPAINTENGINE_H 19 #define QGSDXFPAINTENGINE_H 21 #include <QPaintEngine> 34 bool begin( QPaintDevice* pdev )
override;
36 QPaintEngine::Type type()
const override;
37 void updateState(
const QPaintEngineState& state )
override;
39 void drawPixmap(
const QRectF& r,
const QPixmap& pm,
const QRectF& sr )
override;
41 void drawPolygon(
const QPointF * points,
int pointCount, PolygonDrawMode mode )
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;
61 QPolygonF mCurrentPolygon;
62 QList<QPointF> mCurrentCurve;
64 QgsPoint toDxfCoordinates(
const QPointF& pt )
const;
65 double currentWidth()
const;
67 void moveTo(
double dx,
double dy );
68 void lineTo(
double dx,
double dy );
69 void curveTo(
double dx,
double dy );
73 void setRing(
QgsPolyline &polyline,
const QPointF * points,
int pointCount );
76 static QPointF bezierPoint(
const QList<QPointF>& controlPolygon,
double t );
77 static double bernsteinPoly(
int n,
int i,
double t );
78 static int lower(
int n,
int i );
79 static double power(
double a,
int b );
83 #endif // QGSDXFPAINTENGINE_H A paint device for drawing into dxf files.
QVector< QgsPoint > QgsPolyline
polyline is represented as a vector of points
int ANALYSIS_EXPORT faculty(int n)
faculty function
QVector< QgsPolyline > QgsPolygon
polygon: first item of the list is outer ring, inner rings (if any) start from second item ...
A class to represent a point.
double ANALYSIS_EXPORT power(double a, int b)
power function for integer coefficients
int ANALYSIS_EXPORT lower(int n, int i)
lower function
void setShift(const QPointF &shift)
void setLayer(const QString &layer)