Class: QgsTiledSceneRenderer¶
Abstract base class for 2d tiled scene renderers.
Added in version 3.34.
Class Hierarchy¶
Subclasses¶
Renders tiled scene layers using textures.  | 
|
Renders tiled scene layers using the raw primitive wireframes.  | 
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.  | 
|
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.  | 
Static Methods
Creates a renderer from an XML element.  | 
- class qgis.core.QgsTiledSceneRenderer[source]¶
 Bases:
object- clone(self) QgsTiledSceneRenderer | None[source]¶
 Create a deep copy of this renderer. Should be implemented by all subclasses and generate a proper subclass.
- Return type:
 Optional[QgsTiledSceneRenderer]
- copyCommonProperties(self, destination: QgsTiledSceneRenderer | None)[source]¶
 Copies common tiled scene renderer properties (such as screen error) to the
destinationrenderer.- Parameters:
 destination (Optional[QgsTiledSceneRenderer])
- createLegendNodes(self, nodeLayer: QgsLayerTreeLayer | None) List[QgsLayerTreeModelLegendNode]¶
 Creates a set of legend nodes representing the renderer.
- Parameters:
 nodeLayer (Optional[QgsLayerTreeLayer])
- Return type:
 
- flags(self) Qgis.TiledSceneRendererFlags[source]¶
 Returns flags which control how the renderer behaves.
- Return type:
 
- isTileBorderRenderingEnabled(self) bool[source]¶
 Returns whether to render also borders of tiles.
see
setTileBorderRenderingEnabled()- Return type:
 bool
- legendRuleKeys(self) List[str][source]¶
 Returns a list of all rule keys for legend nodes created by the renderer.
- Return type:
 List[str]
- static load(element: QDomElement, context: QgsReadWriteContext) QgsTiledSceneRenderer | None[source]¶
 Creates a renderer from an XML
element.Caller takes ownership of the returned renderer.
See also
- Parameters:
 element (QDomElement)
context (QgsReadWriteContext)
- Return type:
 Optional[QgsTiledSceneRenderer]
- maximumScreenError(self) float[source]¶
 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[source]¶
 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)[source]¶
 Renders a
line.- Parameters:
 context (QgsTiledSceneRenderContext)
line (QPolygonF)
- renderTriangle(self, context: QgsTiledSceneRenderContext, triangle: QPolygonF)[source]¶
 Renders a
triangle.- Parameters:
 context (QgsTiledSceneRenderContext)
triangle (QPolygonF)
- restoreCommonProperties(self, element: QDomElement, context: QgsReadWriteContext)[source]¶
 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[source]¶
 Saves the renderer configuration to an XML element.
See also
- Parameters:
 doc (QDomDocument)
context (QgsReadWriteContext)
- Return type:
 QDomElement
- saveCommonProperties(self, element: QDomElement, context: QgsReadWriteContext)[source]¶
 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)[source]¶
 Sets the maximum screen
errorallowed 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)[source]¶
 Sets the
unitfor the maximum screen error allowed when rendering the tiled scene.See also
See also
- Parameters:
 unit (Qgis.RenderUnit)
- setTileBorderRenderingEnabled(self, enabled: bool)[source]¶
 Sets whether to render the borders of tiles.
See also
- Parameters:
 enabled (bool)
- startRender(self, context: QgsTiledSceneRenderContext)[source]¶
 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)[source]¶
 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)