Class: QgsTiledSceneRenderer¶
- class qgis.core.QgsTiledSceneRenderer¶
Bases:
sip.wrapper
Abstract base class for 2d tiled scene renderers.
Added in version 3.34.
QgsTiledSceneRenderer() Constructor for QgsTiledSceneRenderer.
Methods
Create a deep copy of this renderer.
Copies common tiled scene renderer properties (such as screen error) to the
destination
renderer.Creates a set of legend nodes representing the renderer.
Returns flags which control how the renderer behaves.
Returns whether to render also borders of tiles.
Returns a list of all rule keys for legend nodes created by the renderer.
Creates a renderer from an XML
element
.Returns the maximum screen error allowed when rendering the tiled scene.
Returns the unit for the maximum screen error allowed when rendering the tiled scene.
Renders a
line
.Renders a
triangle
.Restores common renderer properties (such as screen error) from the specified DOM
element
.Saves the renderer configuration to an XML element.
Saves common renderer properties (such as point size and screen error) to the specified DOM
element
.Sets the maximum screen
error
allowed when rendering the tiled scene.Sets the
unit
for the maximum screen error allowed when rendering the tiled scene.Sets whether to render the borders of tiles.
Must be called when a new render cycle is started.
Must be called when a render cycle has finished, to allow the renderer to clean up.
Returns the identifier of the renderer type.
- clone(self) QgsTiledSceneRenderer ¶
Create a deep copy of this renderer. Should be implemented by all subclasses and generate a proper subclass.
- Return type:
- copyCommonProperties(self, destination: QgsTiledSceneRenderer)¶
Copies common tiled scene renderer properties (such as screen error) to the
destination
renderer.- Parameters:
destination (QgsTiledSceneRenderer)
- createLegendNodes(self, nodeLayer: QgsLayerTreeLayer) List[QgsLayerTreeModelLegendNode] ¶
Creates a set of legend nodes representing the renderer.
- Parameters:
nodeLayer (QgsLayerTreeLayer)
- Return type:
- flags(self) Qgis.TiledSceneRendererFlags ¶
Returns flags which control how the renderer behaves.
- Return type:
- isTileBorderRenderingEnabled(self) bool ¶
Returns whether to render also borders of tiles.
see
setTileBorderRenderingEnabled()
- Return type:
bool
- legendRuleKeys(self) List[str] ¶
Returns a list of all rule keys for legend nodes created by the renderer.
- Return type:
List[str]
- load(element: QDomElement, context: QgsReadWriteContext) QgsTiledSceneRenderer ¶
Creates a renderer from an XML
element
.Caller takes ownership of the returned renderer.
See also
- Parameters:
element (QDomElement)
context (QgsReadWriteContext)
- Return type:
- maximumScreenError(self) float ¶
Returns the maximum screen error allowed when rendering the tiled scene.
Larger values result in a faster render with less detailed features rendered.
Units are retrieved via
maximumScreenErrorUnit()
.See also
See also
- Return type:
float
- maximumScreenErrorUnit(self) Qgis.RenderUnit ¶
Returns the unit for the maximum screen error allowed when rendering the tiled scene.
See also
See also
- Return type:
- renderLine(self, context: QgsTiledSceneRenderContext, line: QPolygonF)¶
Renders a
line
.- Parameters:
context (QgsTiledSceneRenderContext)
line (QPolygonF)
- renderTriangle(self, context: QgsTiledSceneRenderContext, triangle: QPolygonF)¶
Renders a
triangle
.- Parameters:
context (QgsTiledSceneRenderContext)
triangle (QPolygonF)
- restoreCommonProperties(self, element: QDomElement, context: QgsReadWriteContext)¶
Restores common renderer properties (such as screen error) from the specified DOM
element
.See also
- Parameters:
element (QDomElement)
context (QgsReadWriteContext)
- save(self, doc: QDomDocument, context: QgsReadWriteContext) QDomElement ¶
Saves the renderer configuration to an XML element.
See also
- Parameters:
doc (QDomDocument)
context (QgsReadWriteContext)
- Return type:
QDomElement
- saveCommonProperties(self, element: QDomElement, context: QgsReadWriteContext)¶
Saves common renderer properties (such as point size and screen error) to the specified DOM
element
.See also
- Parameters:
element (QDomElement)
context (QgsReadWriteContext)
- setMaximumScreenError(self, error: float)¶
Sets the maximum screen
error
allowed when rendering the tiled scene.Larger values result in a faster render with less detailed features rendered.
Units are set via
setMaximumScreenErrorUnit()
.See also
See also
- Parameters:
error (float)
- setMaximumScreenErrorUnit(self, unit: Qgis.RenderUnit)¶
Sets the
unit
for the maximum screen error allowed when rendering the tiled scene.See also
See also
- Parameters:
unit (Qgis.RenderUnit)
- setTileBorderRenderingEnabled(self, enabled: bool)¶
Sets whether to render the borders of tiles.
See also
- Parameters:
enabled (bool)
- startRender(self, context: QgsTiledSceneRenderContext)¶
Must be called when a new render cycle is started. A call to
startRender()
must always be followed by a corresponding call tostopRender()
after all features have been rendered.See also
Warning
This method is not thread safe. Before calling
startRender()
in a non-main thread, the renderer should instead be cloned andstartRender()
/stopRender()
called on the clone.- Parameters:
context (QgsTiledSceneRenderContext)
- stopRender(self, context: QgsTiledSceneRenderContext)¶
Must be called when a render cycle has finished, to allow the renderer to clean up.
Calls to
stopRender()
must always be preceded by a call tostartRender()
.Warning
This method is not thread safe. Before calling
startRender()
in a non-main thread, the renderer should instead be cloned andstartRender()
/stopRender()
called on the clone.See also
- Parameters:
context (QgsTiledSceneRenderContext)
- type(self) str ¶
Returns the identifier of the renderer type.
- Return type:
str