Class: QgsRenderedItemResults

class qgis.core.QgsRenderedItemResults

Bases: sip.wrapper

Stores collated details of rendered items during a map rendering operation.

New in version 3.22.

QgsRenderedItemResults(extent: QgsRectangle = QgsRectangle()) Constructor for QgsRenderedItemResults.

The extent argument can be used to specify an expected maximal extent for items which will be stored in the results. This helps to optimise the spatial indices used by the object.

Methods

appendResults

Appends rendered item details to the results object.

eraseResultsFromLayers

Erases results from layers matching those in the specified list of layers IDs.

renderedAnnotationItemsInBounds

Returns a list with details of the rendered annotation items within the specified bounds.

renderedItems

Returns a list of all rendered items.

transferResults

Transfers all results from an other QgsRenderedItemResults object where the items have layer IDs matching the specified list.

appendResults(self, results: Iterable[QgsRenderedItemDetails], context: QgsRenderContext)

Appends rendered item details to the results object.

Ownership of results is transferred to the this object.

The render context argument is used to specify the render context used to render the items. It will be used to transform the details to the destination map CRS.

Parameters:
eraseResultsFromLayers(self, layerIds: Iterable[str])

Erases results from layers matching those in the specified list of layers IDs.

Parameters:

layerIds (Iterable[str]) –

renderedAnnotationItemsInBounds(self, bounds: QgsRectangle) List[QgsRenderedAnnotationItemDetails]

Returns a list with details of the rendered annotation items within the specified bounds.

New in version 3.22.

Parameters:

bounds (QgsRectangle) –

Return type:

List[QgsRenderedAnnotationItemDetails]

renderedItems(self) List[QgsRenderedItemDetails]

Returns a list of all rendered items.

Return type:

List[QgsRenderedItemDetails]

transferResults(self, other: QgsRenderedItemResults, layerIds: Iterable[str])

Transfers all results from an other QgsRenderedItemResults object where the items have layer IDs matching the specified list.

Items are removed from other and transferred to this object.

Warning

After calling this method the other results will be left in an undefined state.

transferResults(self, other: QgsRenderedItemResults) Transfers all results from an other QgsRenderedItemResults object to this one.

Items are removed from other and transferred to this object.

Warning

After calling this method the other results will be left in an undefined state.

Parameters: