Class: QgsHillshadeRendererWidget

Renderer widget for the hill shade renderer.

QgsHillshadeRendererWidget

QgsHillshadeRendererWidget

Class Hierarchy

Inheritance diagram of qgis.gui.QgsHillshadeRendererWidget

Base classes

QgsRasterRendererWidget

Abstract base class for widgets which configure a QgsRasterRenderer.

QWidget

QObject

QPaintDevice

Methods

altitude

Returns the angle of the light source over the raster.

azimuth

Returns the direction of the light over the raster between 0-360.

multiDirectional

Returns True if the renderer should use the multi-directional hillshade algorithm.

setAltitude

Set the altitude of the light source

setAzimuth

Set the azimuth of the light source.

setFromRenderer

Set the widget state from the given renderer.

setMultiDirectional

Sets whether to render using a multi-directional hillshade algorithm.

setZFactor

Set the Z scaling factor of the result image.

zFactor

Returns the Z scaling factor.

Static Methods

create

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

setAltitude()

Return type:

float

azimuth(self) float[source]

Returns the direction of the light over the raster between 0-360.

See also

setAzimuth()

Return type:

float

static create(layer: QgsRasterLayer | None, extent: QgsRectangle) QgsRasterRendererWidget | None[source]

Factory method to create the renderer for this type.

Parameters:
Return type:

Optional[QgsRasterRendererWidget]

multiDirectional(self) bool[source]

Returns True if the renderer should use the multi-directional hillshade algorithm.

Return type:

bool

setAltitude(self, altitude: float)[source]

Set the altitude of the light source

Parameters:

altitude (float) – the altitude

See also

altitude()

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

azimuth()

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

setZFactor(self, zfactor: float)[source]

Set the Z scaling factor of the result image.

Parameters:

zfactor (float) – The z factor

See also

zFactor()

zFactor(self) float[source]

Returns the Z scaling factor.

See also

setZFactor()

Return type:

float