QGIS API Documentation 3.41.0-Master (af5edcb665c)
|
A paint device which converts everything renderer to a QgsGeometry representation of the rendered shapes. More...
#include <qgsgeometrypaintdevice.h>
Public Member Functions | |
QgsGeometryPaintDevice (bool usePathStroker=false) | |
Constructor for QgsGeometryPaintDevice. | |
const QgsAbstractGeometry & | geometry () const |
Returns the rendered geometry. | |
int | metric (PaintDeviceMetric metric) const override |
QPaintEngine * | paintEngine () const override |
void | setSimplificationTolerance (double tolerance) |
Sets a simplification tolerance (in painter units) to use for on-the-fly simplification of geometries while rendering. | |
void | setStrokedPathSegments (int segments) |
Sets the number of segments to use when drawing stroked paths with a rounded pen. | |
Static Public Member Functions | |
static QgsGeometry | painterPathToGeometry (const QPainterPath &path) |
Converts a painter path to a QgsGeometry. | |
A paint device which converts everything renderer to a QgsGeometry representation of the rendered shapes.
Definition at line 124 of file qgsgeometrypaintdevice.h.
QgsGeometryPaintDevice::QgsGeometryPaintDevice | ( | bool | usePathStroker = false | ) |
Constructor for QgsGeometryPaintDevice.
If usePathStroker is true
, rendered paths will be converted using a stroke respecting the QPainter pen configuration.
Definition at line 620 of file qgsgeometrypaintdevice.cpp.
const QgsAbstractGeometry & QgsGeometryPaintDevice::geometry | ( | ) | const |
Returns the rendered geometry.
Definition at line 688 of file qgsgeometrypaintdevice.cpp.
|
override |
Definition at line 642 of file qgsgeometrypaintdevice.cpp.
|
override |
Definition at line 637 of file qgsgeometrypaintdevice.cpp.
|
static |
Converts a painter path to a QgsGeometry.
Definition at line 693 of file qgsgeometrypaintdevice.cpp.
void QgsGeometryPaintDevice::setSimplificationTolerance | ( | double | tolerance | ) |
Sets a simplification tolerance (in painter units) to use for on-the-fly simplification of geometries while rendering.
This will result in simpler, generalised paths.
Set tolerance to 0 to disable simplification. (No simplification is the default behavior).
Definition at line 631 of file qgsgeometrypaintdevice.cpp.
void QgsGeometryPaintDevice::setStrokedPathSegments | ( | int | segments | ) |
Sets the number of segments to use when drawing stroked paths with a rounded pen.
The default is 8 segments, a smaller number will result in simpler paths.
Definition at line 625 of file qgsgeometrypaintdevice.cpp.