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

Inheritance diagram of qgis.core.QgsPointCloudExtentRenderer

Base classes

QgsPointCloudRenderer

Abstract base class for 2d point cloud renderers.

Methods

fillSymbol

Returns the symbol used to render the cloud's extent.

renderExtent

Renders a polygon extent geometry to the specified render context.

renderLabel

Renders a label inside the specified extent rectangle.

setFillSymbol

Sets the symbol used to render the cloud's extent.

Static Methods

create

Creates an extent renderer from an XML element.

defaultFillSymbol

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 no symbol 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:
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

setFillSymbol()

Return type:

Optional[QgsFillSymbol]

renderExtent(self, extent: QgsGeometry, context: QgsPointCloudRenderContext)[source]

Renders a polygon extent geometry to the specified render context.

Parameters:
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

fillSymbol()

Parameters:

symbol (Optional[QgsFillSymbol])