16#ifndef QGSGEOMETRYPAINTDEVICE_H
17#define QGSGEOMETRYPAINTDEVICE_H
26#include <QPaintDevice>
27#include <QPaintEngine>
28#include <QPainterPath>
68 bool begin( QPaintDevice * )
final;
70 QPaintEngine::Type
type()
const final;
71 void updateState(
const QPaintEngineState & )
final;
74 void drawImage(
const QRectF &rectangle,
const QImage &image,
const QRectF &sr, Qt::ImageConversionFlags flags = Qt::AutoColor )
final;
75 void drawPixmap(
const QRectF &,
const QPixmap &,
const QRectF & )
final;
76 void drawTiledPixmap(
const QRectF &rect,
const QPixmap &pixmap,
const QPointF &p )
final;
81 void drawLines(
const QLineF *lines,
int lineCount )
final;
82 void drawLines(
const QLine *lines,
int lineCount )
final;
83 void drawPoints(
const QPointF *points,
int pointCount )
final;
84 void drawPoints(
const QPoint *points,
int pointCount )
final;
85 void drawPolygon(
const QPointF *points,
int pointCount, QPaintEngine::PolygonDrawMode mode )
final;
86 void drawPolygon(
const QPoint *points,
int pointCount, QPaintEngine::PolygonDrawMode mode )
final;
87 void drawRects(
const QRectF *rects,
int rectCount )
final;
88 void drawRects(
const QRect *rects,
int rectCount )
final;
89 void drawPath(
const QPainterPath &path )
final;
105 void addSubpathGeometries(
const QPainterPath &path,
const QTransform &matrix );
108 bool mUsePathStroker =
false;
111 int mStrokedPathsSegments = 8;
112 double mSimplifyTolerance = 0;
170 std::unique_ptr<QgsGeometryPaintEngine> mPaintEngine;
JoinStyle
Join styles for buffers.
EndCapStyle
End cap styles for buffers.
Abstract base class for all geometries.
QgsGeometryPaintDevice(bool usePathStroker=false)
Constructor for QgsGeometryPaintDevice.
void setStrokedPathSegments(int segments)
Sets the number of segments to use when drawing stroked paths with a rounded pen.
int metric(PaintDeviceMetric metric) const override
void setSimplificationTolerance(double tolerance)
Sets a simplification tolerance (in painter units) to use for on-the-fly simplification of geometries...
QPaintEngine * paintEngine() const override
static QgsGeometry painterPathToGeometry(const QPainterPath &path)
Converts a painter path to a QgsGeometry.
const QgsAbstractGeometry & geometry() const
Returns the rendered geometry.
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
QgsGeometryPaintEngine(bool usePathStroker=false)
Constructor for QgsGeometryPaintEngine.
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.