QGIS API Documentation 3.38.0-Grenoble (exported)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsGeometryPaintDevice Class Reference

A paint device which converts everything renderer to a QgsGeometry representation of the rendered shapes. More...

#include <qgsgeometrypaintdevice.h>

Inheritance diagram for QgsGeometryPaintDevice:
Inheritance graph
[legend]

Public Member Functions

 QgsGeometryPaintDevice (bool usePathStroker=false)
 Constructor for QgsGeometryPaintDevice.
 
const QgsAbstractGeometrygeometry () 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.
 

Detailed Description

A paint device which converts everything renderer to a QgsGeometry representation of the rendered shapes.

Since
QGIS 3.38

Definition at line 123 of file qgsgeometrypaintdevice.h.

Constructor & Destructor Documentation

◆ QgsGeometryPaintDevice()

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 618 of file qgsgeometrypaintdevice.cpp.

Member Function Documentation

◆ geometry()

const QgsAbstractGeometry & QgsGeometryPaintDevice::geometry ( ) const

Returns the rendered geometry.

Definition at line 686 of file qgsgeometrypaintdevice.cpp.

◆ metric()

int QgsGeometryPaintDevice::metric ( PaintDeviceMetric  metric) const
override

Definition at line 640 of file qgsgeometrypaintdevice.cpp.

◆ paintEngine()

QPaintEngine * QgsGeometryPaintDevice::paintEngine ( ) const
override

Definition at line 635 of file qgsgeometrypaintdevice.cpp.

◆ setSimplificationTolerance()

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 629 of file qgsgeometrypaintdevice.cpp.

◆ setStrokedPathSegments()

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 623 of file qgsgeometrypaintdevice.cpp.


The documentation for this class was generated from the following files: