Class: QgsSingleBandGrayRenderer¶
Raster renderer pipe for single band gray.
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 color ramp shader legend settings. |
|
Takes ownership |
|
Sets the color ramp shader legend settings. |
Static Methods
Attributes
- class qgis.core.QgsSingleBandGrayRenderer[source]¶
Bases:
QgsRasterRenderer
- BlackToWhite = 0¶
- class Gradient¶
Bases:
int
- WhiteToBlack = 1¶
- contrastEnhancement(self) QgsContrastEnhancement | None [source]¶
- Return type:
Optional[QgsContrastEnhancement]
- static create(elem: QDomElement, input: QgsRasterInterface | None) QgsRasterRenderer | None [source]¶
- Parameters:
elem (QDomElement)
input (Optional[QgsRasterInterface])
- Return type:
Optional[QgsRasterRenderer]
- gradient(self) QgsSingleBandGrayRenderer.Gradient [source]¶
- Return type:
- grayBand(self) int [source]¶
Deprecated since version 3.38.
Use
inputBand()
instead.- Return type:
int
- legendSettings(self) QgsColorRampLegendNodeSettings | None [source]¶
Returns the color ramp shader legend settings.
See also
Added in version 3.18.
- Return type:
Optional[QgsColorRampLegendNodeSettings]
- setContrastEnhancement(self, ce: QgsContrastEnhancement | None)[source]¶
Takes ownership
- Parameters:
ce (Optional[QgsContrastEnhancement])
- setGradient(self, gradient: QgsSingleBandGrayRenderer.Gradient)[source]¶
- Parameters:
gradient (QgsSingleBandGrayRenderer.Gradient)
- setGrayBand(self, band: int)[source]¶
Deprecated since version 3.38.
Use
setInputBand()
instead.- Parameters:
band (int)
- setLegendSettings(self, settings: QgsColorRampLegendNodeSettings | None)[source]¶
Sets the color ramp shader legend
settings
.Ownership of
settings
is transferred.See also
Added in version 3.18.
- Parameters:
settings (Optional[QgsColorRampLegendNodeSettings])