QGIS API Documentation 3.41.0-Master (fda2aa46e9a)
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
QgsRasterDrawer Class Reference

The drawing pipe for raster layers. More...

#include <qgsrasterdrawer.h>

Public Member Functions

 QgsRasterDrawer (QgsRasterIterator *iterator)
 The QgsRasterDrawer constructor.
 
Q_DECL_DEPRECATED QgsRasterDrawer (QgsRasterIterator *iterator, double dpiTarget)
 The QgsRasterDrawer constructor.
 
void draw (QgsRenderContext &context, QgsRasterViewPort *viewPort, QgsRasterBlockFeedback *feedback=nullptr)
 Draws raster data.
 
void draw (QPainter *p, QgsRasterViewPort *viewPort, const QgsMapToPixel *qgsMapToPixel, QgsRasterBlockFeedback *feedback=nullptr)
 Draws raster data.
 

Protected Member Functions

void drawImage (QPainter *p, QgsRasterViewPort *viewPort, const QImage &img, int topLeftCol, int topLeftRow, const QgsMapToPixel *mapToPixel=nullptr) const
 Draws raster part.
 

Detailed Description

The drawing pipe for raster layers.

Definition at line 37 of file qgsrasterdrawer.h.

Constructor & Destructor Documentation

◆ QgsRasterDrawer() [1/2]

QgsRasterDrawer::QgsRasterDrawer ( QgsRasterIterator iterator,
double  dpiTarget 
)

The QgsRasterDrawer constructor.

Parameters
iteratorthe raster iterator to fetch data from
dpiTargetthe target dpi (dots per inch) to be taken into consideration when rendering
Deprecated:
QGIS 3.28. Use the constructor without the dpiTarget argument instead, as DPI is now handled by the draw() method which accepts a QgsRenderContext.

Definition at line 30 of file qgsrasterdrawer.cpp.

◆ QgsRasterDrawer() [2/2]

QgsRasterDrawer::QgsRasterDrawer ( QgsRasterIterator iterator)

The QgsRasterDrawer constructor.

Parameters
iteratorthe raster iterator to fetch data from

Definition at line 36 of file qgsrasterdrawer.cpp.

Member Function Documentation

◆ draw() [1/2]

void QgsRasterDrawer::draw ( QgsRenderContext context,
QgsRasterViewPort viewPort,
QgsRasterBlockFeedback feedback = nullptr 
)

Draws raster data.

Parameters
contextthe render context
viewPortviewport to render
feedbackoptional raster feedback object for cancellation/preview.
Since
QGIS 3.28

Definition at line 41 of file qgsrasterdrawer.cpp.

◆ draw() [2/2]

void QgsRasterDrawer::draw ( QPainter *  p,
QgsRasterViewPort viewPort,
const QgsMapToPixel qgsMapToPixel,
QgsRasterBlockFeedback feedback = nullptr 
)

Draws raster data.

Parameters
pdestination QPainter
viewPortviewport to render
qgsMapToPixelmap to pixel converter
feedbackoptional raster feedback object for cancellation/preview. Added in QGIS 3.0.

Definition at line 49 of file qgsrasterdrawer.cpp.

◆ drawImage()

void QgsRasterDrawer::drawImage ( QPainter *  p,
QgsRasterViewPort viewPort,
const QImage &  img,
int  topLeftCol,
int  topLeftRow,
const QgsMapToPixel mapToPixel = nullptr 
) const
protected

Draws raster part.

Parameters
pthe painter to draw to
viewPortview port to draw to
imgimage to draw
topLeftColLeft position relative to left border of viewport
topLeftRowTop position relative to top border of viewport
mapToPixelmap to device coordinate transformation info
Note
not available in Python bindings

Definition at line 134 of file qgsrasterdrawer.cpp.


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