Subgroup: Raster
Class: QgsRasterShader¶
-
class
qgis.core.
QgsRasterShader
¶ Bases:
sip.wrapper
Interface for all raster shaders.
Methods
maximumValue
Return the maximum value for the raster shader minimumValue
Return the minimum value for the raster shader rasterShaderFunction
readXml
Reads shader state from an XML element. setMaximumValue
Set the maximum value setMinimumValue
Return the minimum value setRasterShaderFunction
A public method that allows the user to set their own shader function shade
generates and new RGBA value based on one input value writeXml
Writes shader state to an XML element. Signals
Attributes
-
maximumValue
(self) → float¶ Return the maximum value for the raster shader
-
minimumValue
(self) → float¶ Return the minimum value for the raster shader
-
rasterShaderFunction
(self) → QgsRasterShaderFunction¶
-
readXml
(self, elem: QDomElement)¶ Reads shader state from an XML element.
-
setMaximumValue
(self, float)¶ Set the maximum value
-
setMinimumValue
(self, float)¶ Return the minimum value
-
setRasterShaderFunction
(self, function: QgsRasterShaderFunction)¶ A public method that allows the user to set their own shader function
Note
Raster shader takes ownership of the shader function instance *
-
shade
(self, value: float) → Tuple[bool, int, int, int, int]¶ generates and new RGBA value based on one input value
- shade(self, redValue: float, greenValue: float, blueValue: float, alphaValue: float) -> Tuple[bool, int, int, int, int]
- generates and new RGBA value based on original RGBA value
-
writeXml
(self, doc: QDomDocument, parent: QDomElement)¶ Writes shader state to an XML element.
-