Class: QgsPointCloudExtentRenderer¶
A renderer for 2d visualisation of point clouds which shows the dataset’s extents using a fill symbol.
Added in version 3.18.
Class Hierarchy¶
Base classes¶
Abstract base class for 2d point cloud renderers. |
Methods
Returns the symbol used to render the cloud's extent. |
|
Renders a polygon extent geometry to the specified render context. |
|
Renders a label inside the specified extent rectangle. |
|
Sets the symbol used to render the cloud's extent. |
Static Methods
Creates an extent renderer from an XML element. |
|
Returns a new instance of the default fill symbol to use for showing point cloud extents. |
- class qgis.core.QgsPointCloudExtentRenderer[source]¶
Bases:
QgsPointCloudRenderer
- __init__(symbol: QgsFillSymbol | None = None)
Constructor for QgsPointCloudExtentRenderer.
Optionally the
symbol
to use for showing the extent can be specified. If specified, ownership is transferred to the renderer. If nosymbol
is specified a default one will be created instead.- Parameters:
symbol (Optional[QgsFillSymbol] = None)
- static create(element: QDomElement, context: QgsReadWriteContext) QgsPointCloudRenderer | None [source]¶
Creates an extent renderer from an XML
element
.- Parameters:
element (QDomElement)
context (QgsReadWriteContext)
- Return type:
Optional[QgsPointCloudRenderer]
- static defaultFillSymbol() QgsFillSymbol | None [source]¶
Returns a new instance of the default fill symbol to use for showing point cloud extents.
- Return type:
Optional[QgsFillSymbol]
- fillSymbol(self) QgsFillSymbol | None [source]¶
Returns the symbol used to render the cloud’s extent.
See also
- Return type:
Optional[QgsFillSymbol]
- renderExtent(self, extent: QgsGeometry, context: QgsPointCloudRenderContext)[source]¶
Renders a polygon
extent
geometry to the specified rendercontext
.- Parameters:
extent (QgsGeometry)
context (QgsPointCloudRenderContext)
- renderLabel(self, extent: QRectF, text: str | None, context: QgsPointCloudRenderContext)[source]¶
Renders a label inside the specified extent rectangle.
The label will be rendered centered horizontally and vertically inside
extent
. If the label is too large to fit inside this rectangle, it will not be rendered.- Parameters:
extent (QRectF) – rectangle (in painter coordinates) inside which the label will be rendered
text (Optional[str]) – label text to render
context (QgsPointCloudRenderContext) – point cloud rendering context
Added in version 3.42.
- setFillSymbol(self, symbol: QgsFillSymbol | None)[source]¶
Sets the
symbol
used to render the cloud’s extent.Ownership of
symbol
is transferred to the renderer.See also
- Parameters:
symbol (Optional[QgsFillSymbol])