Class: QgsHillshadeRendererWidget¶
Renderer widget for the hill shade renderer.

QgsHillshadeRendererWidget¶
Class Hierarchy¶
Base classes¶
Abstract base class for widgets which configure a |
|
Methods
Returns the angle of the light source over the raster. |
|
Returns the direction of the light over the raster between 0-360. |
|
Returns |
|
Set the altitude of the light source |
|
Set the azimuth of the light source. |
|
Set the widget state from the given renderer. |
|
Sets whether to render using a multi-directional hillshade algorithm. |
|
Set the Z scaling factor of the result image. |
|
Returns the Z scaling factor. |
Static Methods
Factory method to create the renderer for this type. |
- class qgis.gui.QgsHillshadeRendererWidget[source]¶
Bases:
QgsRasterRendererWidget
- __init__(layer: QgsRasterLayer | None, extent: QgsRectangle = QgsRectangle())
Renderer widget for the hill shade renderer.
- Parameters:
layer (Optional[QgsRasterLayer]) – The layer attached for this widget.
extent (
QgsRectangle
= QgsRectangle()) – The current extent.
- altitude(self) float [source]¶
Returns the angle of the light source over the raster.
See also
- Return type:
float
- azimuth(self) float [source]¶
Returns the direction of the light over the raster between 0-360.
See also
- Return type:
float
- static create(layer: QgsRasterLayer | None, extent: QgsRectangle) QgsRasterRendererWidget | None [source]¶
Factory method to create the renderer for this type.
- Parameters:
layer (Optional[QgsRasterLayer])
extent (QgsRectangle)
- Return type:
Optional[QgsRasterRendererWidget]
- multiDirectional(self) bool [source]¶
Returns
True
if the renderer should use the multi-directional hillshade algorithm.See also
- Return type:
bool
- setAltitude(self, altitude: float)[source]¶
Set the altitude of the light source
- Parameters:
altitude (float) – the altitude
See also
- setAzimuth(self, azimuth: float)[source]¶
Set the azimuth of the light source.
- Parameters:
azimuth (float) – The azimuth of the light source, between 0 and 360.0
See also
- setFromRenderer(self, renderer: QgsRasterRenderer | None)[source]¶
Set the widget state from the given renderer.
- Parameters:
renderer (Optional[QgsRasterRenderer]) – The renderer to take the state from.
- setMultiDirectional(self, isMultiDirectional: bool)[source]¶
Sets whether to render using a multi-directional hillshade algorithm.
- Parameters:
isMultiDirectional (bool) – set to
True
to use multi directional rendering
See also
- setZFactor(self, zfactor: float)[source]¶
Set the Z scaling factor of the result image.
- Parameters:
zfactor (float) – The z factor
See also