QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
18 #ifndef QGSRASTERRENDERER_H
19 #define QGSRASTERRENDERER_H
21 #include "qgis_core.h"
64 virtual QString
type()
const {
return mType; }
74 bool usesTransparency()
const;
81 void setOpacity(
double opacity ) { mOpacity = opacity; }
88 double opacity()
const {
return mOpacity; }
123 void readXml(
const QDomElement &rendererElem )
override;
130 void copyCommonProperties(
const QgsRasterRenderer *other,
bool copyMinMaxOrigin =
true );
133 virtual QList<int>
usesBands()
const {
return QList<int>(); }
161 void _writeXml( QDomDocument &doc, QDomElement &rasterRendererElem )
const;
166 double mOpacity = 1.0;
187 QRgb renderColorForNodataPixel()
const;
200 #endif // QGSRASTERRENDERER_H
QgsRasterBlock * block(int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback=nullptr) override=0
Read block of data using given extent and size.
DataType
Raster data types.
const QgsRasterMinMaxOrigin & minMaxOrigin() const
Returns const reference to origin of min/max values.
QColor nodataColor() const
Returns the color to use for shading nodata pixels.
An interface for classes which can visit style entity (e.g.
virtual QString type() const
virtual QList< int > usesBands() const
Returns a list of band numbers used by the renderer.
A rectangle specified with double values.
static const QRgb NODATA_COLOR
This class describes the origin of min/max values.
QgsRasterMinMaxOrigin mMinMaxOrigin
Origin of min/max values.
virtual bool setInput(QgsRasterInterface *input)
Set input.
Raster renderer pipe that applies colors to a raster.
const QgsRasterTransparency * rasterTransparency() const
virtual Qgis::DataType dataType(int bandNo) const =0
Returns data type for the band specified by number.
void setAlphaBand(int band)
virtual void readXml(const QDomElement &filterElem)
Sets base class members from xml. Usually called from create() methods of subclasses.
Defines the list of pixel values to be considered as transparent or semi transparent when rendering r...
QgsRasterRenderer * clone() const override=0
Clone itself, create deep copy.
void setMinMaxOrigin(const QgsRasterMinMaxOrigin &origin)
Sets origin of min/max values.
QMap< QString, QString > QgsStringMap
Base class for processing filters like renderers, reprojector, resampler etc.
virtual void legendSymbologyItems(QList< QPair< QString, QColor > > &symbolItems) const
Gets symbology items if provided by renderer.
Feedback object tailored for raster block reading.
QgsRasterRenderer(const QgsRasterRenderer &)=delete
QgsRasterRenderer cannot be copied. Use clone() instead.
void setNodataColor(const QColor &color)
Sets the color to use for shading nodata pixels.
virtual int bandCount() const =0
Gets number of bands.
const QgsRasterRenderer & operator=(const QgsRasterRenderer &)=delete
QgsRasterRenderer cannot be copied. Use clone() instead.
void setOpacity(double opacity)
Sets the opacity for the renderer, where opacity is a value between 0 (totally transparent) and 1....
double opacity() const
Returns the opacity for the renderer, where opacity is a value between 0 (totally transparent) and 1....