QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
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:
Inheritance graph
[legend]

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

Member Function Documentation

◆ begin()

bool QgsGeometryPaintEngine::begin ( QPaintDevice *  )
final

Definition at line 44 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 67 of file qgsgeometrypaintdevice.cpp.

◆ drawLines() [1/2]

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

Definition at line 134 of file qgsgeometrypaintdevice.cpp.

◆ drawLines() [2/2]

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

Definition at line 120 of file qgsgeometrypaintdevice.cpp.

◆ drawPath()

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

Definition at line 609 of file qgsgeometrypaintdevice.cpp.

◆ drawPixmap()

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

Definition at line 73 of file qgsgeometrypaintdevice.cpp.

◆ drawPoints() [1/2]

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

Definition at line 181 of file qgsgeometrypaintdevice.cpp.

◆ drawPoints() [2/2]

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

Definition at line 175 of file qgsgeometrypaintdevice.cpp.

◆ drawPolygon() [1/2]

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

Definition at line 298 of file qgsgeometrypaintdevice.cpp.

◆ drawPolygon() [2/2]

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

Definition at line 321 of file qgsgeometrypaintdevice.cpp.

◆ drawRects() [1/2]

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

Definition at line 240 of file qgsgeometrypaintdevice.cpp.

◆ drawRects() [2/2]

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

Definition at line 234 of file qgsgeometrypaintdevice.cpp.

◆ drawTiledPixmap()

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

Definition at line 79 of file qgsgeometrypaintdevice.cpp.

◆ end()

bool QgsGeometryPaintEngine::end ( )
final

Definition at line 49 of file qgsgeometrypaintdevice.cpp.

◆ geometry()

const QgsAbstractGeometry & QgsGeometryPaintEngine::geometry ( ) const
inline

Returns the rendered geometry.

Definition at line 100 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 39 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 34 of file qgsgeometrypaintdevice.cpp.

◆ type()

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

Definition at line 54 of file qgsgeometrypaintdevice.cpp.

◆ updateState()

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

Definition at line 59 of file qgsgeometrypaintdevice.cpp.


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