18 #ifndef QGSRASTERRENDERER_H 19 #define QGSRASTERRENDERER_H 21 #include "qgis_core.h" 63 virtual QString
type()
const {
return mType; }
73 bool usesTransparency()
const;
80 void setOpacity(
double opacity ) { mOpacity = opacity; }
87 double opacity()
const {
return mOpacity; }
99 void readXml(
const QDomElement &rendererElem )
override;
105 void copyCommonProperties(
const QgsRasterRenderer *other,
bool copyMinMaxOrigin =
true );
108 virtual QList<int>
usesBands()
const {
return QList<int>(); }
119 void _writeXml( QDomDocument &doc, QDomElement &rasterRendererElem )
const;
124 double mOpacity = 1.0;
144 #endif // QGSRASTERRENDERER_H virtual int bandCount() const =0
Get number of bands.
A rectangle specified with double values.
virtual void readXml(const QDomElement &filterElem)
Sets base class members from xml. Usually called from create() methods of subclasses.
virtual QList< int > usesBands() const
Returns a list of band numbers used by the renderer.
double opacity() const
Returns the opacity for the renderer, where opacity is a value between 0 (totally transparent) and 1...
virtual QString type() const
DataType
Raster data types.
QgsRasterMinMaxOrigin mMinMaxOrigin
Origin of min/max values.
const QgsRasterMinMaxOrigin & minMaxOrigin() const
Returns const reference to origin of min/max values.
virtual Qgis::DataType dataType(int bandNo) const =0
Returns data type for the band specified by number.
const QgsRasterTransparency * rasterTransparency() const
static const QRgb NODATA_COLOR
This class describes the origin of min/max values.
virtual QgsRasterBlock * block(int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback=nullptr)=0
Read block of data using given extent and size.
void setAlphaBand(int band)
Base class for processing filters like renderers, reprojector, resampler etc.
void setMinMaxOrigin(const QgsRasterMinMaxOrigin &origin)
Sets origin of min/max values.
virtual bool setInput(QgsRasterInterface *input)
Set input.
virtual QgsRasterInterface * clone() const =0
Clone itself, create deep copy.
Defines the list of pixel values to be considered as transparent or semi transparent when rendering r...
void setOpacity(double opacity)
Sets the opacity for the renderer, where opacity is a value between 0 (totally transparent) and 1...
virtual void legendSymbologyItems(QList< QPair< QString, QColor > > &symbolItems) const
Get symbology items if provided by renderer.
Feedback object tailored for raster block reading.
Raster renderer pipe that applies colors to a raster.