Class: QgsRasterSingleColorRenderer¶
Raster renderer which renders all data pixels using a single color.
Added in version 3.38.
Class Hierarchy¶
Base classes¶
Raster renderer pipe that applies colors to a raster. |
|
Base class for processing filters like renderers, reprojector, resampler etc. |
Methods
Returns the single color used by the renderer. |
|
Sets the single color used by the renderer. |
Static Methods
Creates an instance of the renderer based on definition from XML (used by the renderer registry) |
- class qgis.core.QgsRasterSingleColorRenderer[source]¶
Bases:
QgsRasterRenderer
- __init__(input: QgsRasterInterface | None, band: int, color: QColor | Qt.GlobalColor)
Creates a single
color
renderer- Parameters:
input (Optional[QgsRasterInterface])
band (int)
color (Union[QColor, Qt.GlobalColor])
- color(self) QColor [source]¶
Returns the single color used by the renderer.
See also
- Return type:
QColor
- static create(elem: QDomElement, input: QgsRasterInterface | None) QgsRasterRenderer | None [source]¶
Creates an instance of the renderer based on definition from XML (used by the renderer registry)
- Parameters:
elem (QDomElement)
input (Optional[QgsRasterInterface])
- Return type:
Optional[QgsRasterRenderer]