QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
QgsGeometryPaintEngine Class Reference

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

#include <qgsgeometrypaintdevice.h>

Inheritance diagram for QgsGeometryPaintEngine:

Public Member Functions

 QgsGeometryPaintEngine (bool usePathStroker=false)
 Constructor for QgsGeometryPaintEngine.
bool begin (QPaintDevice *) final
void drawImage (const QRectF &rectangle, const QImage &image, const QRectF &sr, Qt::ImageConversionFlags flags=Qt::AutoColor) final
void drawLines (const QLine *lines, int lineCount) final
void drawLines (const QLineF *lines, int lineCount) final
void drawPath (const QPainterPath &path) final
void drawPixmap (const QRectF &, const QPixmap &, const QRectF &) final
void drawPoints (const QPoint *points, int pointCount) final
void drawPoints (const QPointF *points, int pointCount) final
void drawPolygon (const QPoint *points, int pointCount, QPaintEngine::PolygonDrawMode mode) final
void drawPolygon (const QPointF *points, int pointCount, QPaintEngine::PolygonDrawMode mode) final
void drawRects (const QRect *rects, int rectCount) final
void drawRects (const QRectF *rects, int rectCount) final
void drawTiledPixmap (const QRectF &rect, const QPixmap &pixmap, const QPointF &p) final
bool end () final
const QgsAbstractGeometrygeometry () 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 while rendering.
void setStrokedPathSegments (int segments)
 Sets the number of segments to use when drawing stroked paths with a rounded pen.
QPaintEngine::Type type () const final
void updateState (const QPaintEngineState &) final

Detailed Description

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

Since
QGIS 3.38

Definition at line 39 of file qgsgeometrypaintdevice.h.

Constructor & Destructor Documentation

◆ QgsGeometryPaintEngine()

QgsGeometryPaintEngine::QgsGeometryPaintEngine ( bool usePathStroker = false)

Constructor for QgsGeometryPaintEngine.

If usePathStroker is true, rendered paths will be converted using a stroke respecting the QPainter pen configuration.

Definition at line 30 of file qgsgeometrypaintdevice.cpp.

Member Function Documentation

◆ begin()

bool QgsGeometryPaintEngine::begin ( QPaintDevice * )
final

Definition at line 46 of file qgsgeometrypaintdevice.cpp.

◆ drawImage()

void QgsGeometryPaintEngine::drawImage ( const QRectF & rectangle,
const QImage & image,
const QRectF & sr,
Qt::ImageConversionFlags flags = Qt::AutoColor )
final

Definition at line 69 of file qgsgeometrypaintdevice.cpp.

◆ drawLines() [1/2]

void QgsGeometryPaintEngine::drawLines ( const QLine * lines,
int lineCount )
final

Definition at line 136 of file qgsgeometrypaintdevice.cpp.

◆ drawLines() [2/2]

void QgsGeometryPaintEngine::drawLines ( const QLineF * lines,
int lineCount )
final

Definition at line 122 of file qgsgeometrypaintdevice.cpp.

◆ drawPath()

void QgsGeometryPaintEngine::drawPath ( const QPainterPath & path)
final

Definition at line 575 of file qgsgeometrypaintdevice.cpp.

◆ drawPixmap()

void QgsGeometryPaintEngine::drawPixmap ( const QRectF & ,
const QPixmap & ,
const QRectF &  )
final

Definition at line 75 of file qgsgeometrypaintdevice.cpp.

◆ drawPoints() [1/2]

void QgsGeometryPaintEngine::drawPoints ( const QPoint * points,
int pointCount )
final

Definition at line 183 of file qgsgeometrypaintdevice.cpp.

◆ drawPoints() [2/2]

void QgsGeometryPaintEngine::drawPoints ( const QPointF * points,
int pointCount )
final

Definition at line 177 of file qgsgeometrypaintdevice.cpp.

◆ drawPolygon() [1/2]

void QgsGeometryPaintEngine::drawPolygon ( const QPoint * points,
int pointCount,
QPaintEngine::PolygonDrawMode mode )
final

Definition at line 300 of file qgsgeometrypaintdevice.cpp.

◆ drawPolygon() [2/2]

void QgsGeometryPaintEngine::drawPolygon ( const QPointF * points,
int pointCount,
QPaintEngine::PolygonDrawMode mode )
final

Definition at line 323 of file qgsgeometrypaintdevice.cpp.

◆ drawRects() [1/2]

void QgsGeometryPaintEngine::drawRects ( const QRect * rects,
int rectCount )
final

Definition at line 242 of file qgsgeometrypaintdevice.cpp.

◆ drawRects() [2/2]

void QgsGeometryPaintEngine::drawRects ( const QRectF * rects,
int rectCount )
final

Definition at line 236 of file qgsgeometrypaintdevice.cpp.

◆ drawTiledPixmap()

void QgsGeometryPaintEngine::drawTiledPixmap ( const QRectF & rect,
const QPixmap & pixmap,
const QPointF & p )
final

Definition at line 81 of file qgsgeometrypaintdevice.cpp.

◆ end()

bool QgsGeometryPaintEngine::end ( )
final

Definition at line 51 of file qgsgeometrypaintdevice.cpp.

◆ geometry()

const QgsAbstractGeometry & QgsGeometryPaintEngine::geometry ( ) const
inline

Returns the rendered geometry.

Definition at line 101 of file qgsgeometrypaintdevice.h.

◆ setSimplificationTolerance()

void QgsGeometryPaintEngine::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 41 of file qgsgeometrypaintdevice.cpp.

◆ setStrokedPathSegments()

void QgsGeometryPaintEngine::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 36 of file qgsgeometrypaintdevice.cpp.

◆ type()

QPaintEngine::Type QgsGeometryPaintEngine::type ( ) const
final

Definition at line 56 of file qgsgeometrypaintdevice.cpp.

◆ updateState()

void QgsGeometryPaintEngine::updateState ( const QPaintEngineState & state)
final

Definition at line 61 of file qgsgeometrypaintdevice.cpp.


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