Class: QgsLabelingEngineContext¶
Encapsulates the context for a labeling engine run.
Added in version 3.40.
Methods
Returns the map extent defining the limits for labeling. |
|
Returns the map label boundary geometry, which defines the limits within which labels may be placed in the map. |
|
Returns a reference to the context's render context. |
|
Sets the map extent defining the limits for labeling. |
|
Sets the map label boundary geometry, which defines the limits within which labels may be placed in the map. |
- class qgis.core.QgsLabelingEngineContext[source]¶
Bases:
object
- __init__(renderContext: QgsRenderContext)
Constructor for QgsLabelingEngineContext.
- Parameters:
renderContext (QgsRenderContext)
- extent(self) QgsRectangle [source]¶
Returns the map extent defining the limits for labeling.
See also
See also
- Return type:
- mapBoundaryGeometry(self) QgsGeometry [source]¶
Returns the map label boundary geometry, which defines the limits within which labels may be placed in the map.
The map boundary geometry specifies the actual geometry of the map boundary, which will be used to detect whether a label is visible (or partially visible) in the rendered map. This may differ from
extent()
in the case of rotated or non-rectangular maps.See also
See also
- Return type:
- renderContext(self) QgsRenderContext ¶
Returns a reference to the context’s render context.
- Return type:
- setExtent(self, extent: QgsRectangle)[source]¶
Sets the map
extent
defining the limits for labeling.See also
See also
- Parameters:
extent (QgsRectangle)
- setMapBoundaryGeometry(self, geometry: QgsGeometry)[source]¶
Sets the map label boundary
geometry
, which defines the limits within which labels may be placed in the map.The map boundary geometry specifies the actual geometry of the map boundary, which will be used to detect whether a label is visible (or partially visible) in the rendered map. This may differ from
extent()
in the case of rotated or non-rectangular maps.See also
See also
- Parameters:
geometry (QgsGeometry)