mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-08 00:02:35 -05:00
The improvement allows immediate cancellation of raster rendering in progress. Until now, even when map rendering got cancelled (e.g. by zooming of panning canvas), the GUI got blocked while waiting for raster layers to finish their rendering (only vector layers have had support for cancellation). This should allow for much smoother user experience while browsing maps including rasters. The cancellation is supported currently by WMS/WMTS and WCS providers. GDAL provider may also get support thanks to improvements in GDAL 2. Funded by Land Information New Zealand.
32 lines
1.1 KiB
Plaintext
32 lines
1.1 KiB
Plaintext
/** \ingroup core
|
|
* The drawing pipe for raster layers.
|
|
*/
|
|
class QgsRasterDrawer
|
|
{
|
|
%TypeHeaderCode
|
|
#include <qgsrasterdrawer.h>
|
|
%End
|
|
public:
|
|
QgsRasterDrawer( QgsRasterIterator *iterator );
|
|
|
|
/** Draws raster data.
|
|
* @param p destination QPainter
|
|
* @param viewPort viewport to render
|
|
* @param theQgsMapToPixel map to pixel convertor
|
|
* @param feedback optional raster feedback object for cancellation/preview. Added in QGIS 3.0.
|
|
*/
|
|
void draw( QPainter* p, QgsRasterViewPort* viewPort, const QgsMapToPixel* theQgsMapToPixel, QgsRasterBlockFeedback* feedback = nullptr );
|
|
|
|
protected:
|
|
/** Draws raster part
|
|
* @param p the painter to draw to
|
|
* @param viewPort view port to draw to
|
|
* @param img image to draw
|
|
* @param topLeftCol Left position relative to left border of viewport
|
|
* @param topLeftRow Top position relative to top border of viewport
|
|
* @param mapToPixel map to device coordinate transformation info
|
|
* @note not available in python bindings
|
|
*/
|
|
//void drawImage( QPainter* p, QgsRasterViewPort* viewPort, const QImage& img, int topLeftCol, int topLeftRow ) const;
|
|
};
|