16#ifndef QGSGEOMETRYPAINTDEVICE_H
17#define QGSGEOMETRYPAINTDEVICE_H
24#include <QPainterPath>
25#include <QPaintDevice>
26#include <QPaintEngine>
67 bool begin( QPaintDevice * )
final;
69 QPaintEngine::Type
type()
const final;
70 void updateState(
const QPaintEngineState & )
final;
73 void drawImage(
const QRectF &rectangle,
const QImage &image,
const QRectF &sr, Qt::ImageConversionFlags flags = Qt::AutoColor )
final;
74 void drawPixmap(
const QRectF &,
const QPixmap &,
const QRectF & )
final;
75 void drawTiledPixmap(
const QRectF &rect,
const QPixmap &pixmap,
const QPointF &p )
final;
80 void drawLines(
const QLineF *lines,
int lineCount )
final;
81 void drawLines(
const QLine *lines,
int lineCount )
final;
82 void drawPoints(
const QPointF *points,
int pointCount )
final;
83 void drawPoints(
const QPoint *points,
int pointCount )
final;
84 void drawPolygon(
const QPointF *points,
int pointCount, QPaintEngine::PolygonDrawMode mode )
final;
85 void drawPolygon(
const QPoint *points,
int pointCount, QPaintEngine::PolygonDrawMode mode )
final;
86 void drawRects(
const QRectF *rects,
int rectCount )
final;
87 void drawRects(
const QRect *rects,
int rectCount )
final;
88 void drawPath(
const QPainterPath &path )
final;
104 void addSubpathGeometries(
const QPainterPath &path,
const QTransform &matrix );
109 bool mUsePathStroker =
false;
112 int mStrokedPathsSegments = 8;
113 double mSimplifyTolerance = 0;
142 void setStrokedPathSegments(
int segments );
151 void setSimplificationTolerance(
double tolerance );
153 QPaintEngine *paintEngine()
const override;
155 int metric( PaintDeviceMetric metric )
const override;
167 static QgsGeometry painterPathToGeometry(
const QPainterPath &path );
171 std::unique_ptr<QgsGeometryPaintEngine> mPaintEngine;
JoinStyle
Join styles for buffers.
EndCapStyle
End cap styles for buffers.
Abstract base class for all geometries.
A paint device which converts everything renderer to a QgsGeometry representation of the rendered sha...
A paint engine which converts everything renderer to a QgsGeometry representation of the rendered sha...
void setSimplificationTolerance(double tolerance)
Sets a simplification tolerance (in painter units) to use for on-the-fly simplification of geometries...
void drawImage(const QRectF &rectangle, const QImage &image, const QRectF &sr, Qt::ImageConversionFlags flags=Qt::AutoColor) final
void drawRects(const QRectF *rects, int rectCount) final
void drawPolygon(const QPointF *points, int pointCount, QPaintEngine::PolygonDrawMode mode) final
const QgsAbstractGeometry & geometry() const
Returns the rendered geometry.
void drawPixmap(const QRectF &, const QPixmap &, const QRectF &) final
void drawPoints(const QPointF *points, int pointCount) final
bool begin(QPaintDevice *) final
void drawLines(const QLineF *lines, int lineCount) final
QPaintEngine::Type type() const final
void drawTiledPixmap(const QRectF &rect, const QPixmap &pixmap, const QPointF &p) final
void updateState(const QPaintEngineState &) final
void drawPath(const QPainterPath &path) final
void setStrokedPathSegments(int segments)
Sets the number of segments to use when drawing stroked paths with a rounded pen.
A geometry is the spatial representation of a feature.
Line string geometry type, with support for z-dimension and m-values.