QgsHillshadeRendererWidget class
Renderer widget for the hill shade renderer.
Contents
Public static functions
- static auto create(QgsRasterLayer* layer, const QgsRectangle& extent) -> QgsRasterRendererWidget*
- Factory method to create the renderer for this type.
Constructors, destructors, conversion operators
- QgsHillshadeRendererWidget(QgsRasterLayer* layer, const QgsRectangle& extent = QgsRectangle())
- Renderer widget for the hill shade renderer.
Public functions
- auto altitude() const -> double
- Returns the angle of the light source over the raster.
- auto azimuth() const -> double
- Returns the direction of the light over the raster between 0-360.
- auto multiDirectional() const -> bool
- Returns true if the renderer should use the multi-directional hillshade algorithm.
- auto renderer() -> QgsRasterRenderer* override
- The renderer for the widget.
- void setFromRenderer(const QgsRasterRenderer* renderer)
- Set the widget state from the given renderer.
- auto zFactor() const -> double
- Returns the Z scaling factor.
Public slots
- void setAltitude(double altitude)
- Set the altitude of the light source.
- void setAzimuth(double azimuth)
- Set the azimuth of the light source.
- void setMultiDirectional(bool isMultiDirectional)
- Sets whether to render using a multi-directional hillshade algorithm.
- void setZFactor(double zfactor)
- Set the Z scaling factor of the result image.
Function documentation
QgsHillshadeRendererWidget:: QgsHillshadeRendererWidget(QgsRasterLayer* layer,
const QgsRectangle& extent = QgsRectangle())
Renderer widget for the hill shade renderer.
| Parameters | |
|---|---|
| layer | The layer attached for this widget. |
| extent | The current extent. |
double QgsHillshadeRendererWidget:: altitude() const
Returns the angle of the light source over the raster.
double QgsHillshadeRendererWidget:: azimuth() const
Returns the direction of the light over the raster between 0-360.
bool QgsHillshadeRendererWidget:: multiDirectional() const
Returns true if the renderer should use the multi-directional hillshade algorithm.
QgsRasterRenderer* QgsHillshadeRendererWidget:: renderer() override
The renderer for the widget.
| Returns | A new renderer for the the config in the widget |
|---|
void QgsHillshadeRendererWidget:: setFromRenderer(const QgsRasterRenderer* renderer)
Set the widget state from the given renderer.
| Parameters | |
|---|---|
| renderer | The renderer to take the state from. |
double QgsHillshadeRendererWidget:: zFactor() const
Returns the Z scaling factor.
void QgsHillshadeRendererWidget:: setAltitude(double altitude) public slot
Set the altitude of the light source.
| Parameters | |
|---|---|
| altitude | the altitude |
void QgsHillshadeRendererWidget:: setAzimuth(double azimuth) public slot
Set the azimuth of the light source.
| Parameters | |
|---|---|
| azimuth | The azimuth of the light source, between 0 and 360.0 |
void QgsHillshadeRendererWidget:: setMultiDirectional(bool isMultiDirectional) public slot
Sets whether to render using a multi-directional hillshade algorithm.
| Parameters | |
|---|---|
| isMultiDirectional | set to true to use multi directional rendering |
void QgsHillshadeRendererWidget:: setZFactor(double zfactor) public slot
Set the Z scaling factor of the result image.
| Parameters | |
|---|---|
| zfactor | The z factor |