QGIS API Documentation 3.41.0-Master (fda2aa46e9a)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsLabelingEngineContext Class Reference

Encapsulates the context for a labeling engine run. More...

#include <qgslabelingenginerule.h>

Public Member Functions

 QgsLabelingEngineContext (const QgsLabelingEngineContext &other)=delete
 
 QgsLabelingEngineContext (QgsRenderContext &renderContext)
 Constructor for QgsLabelingEngineContext.
 
QgsRectangle extent () const
 Returns the map extent defining the limits for labeling.
 
QgsGeometry mapBoundaryGeometry () const
 Returns the map label boundary geometry, which defines the limits within which labels may be placed in the map.
 
QgsLabelingEngineContextoperator= (const QgsLabelingEngineContext &other)=delete
 
QgsRenderContextrenderContext ()
 Returns a reference to the context's render context.
 
const QgsRenderContextrenderContext () const
 Returns a reference to the context's render context.
 
void setExtent (const QgsRectangle &extent)
 Sets the map extent defining the limits for labeling.
 
void setMapBoundaryGeometry (const QgsGeometry &geometry)
 Sets the map label boundary geometry, which defines the limits within which labels may be placed in the map.
 

Detailed Description

Encapsulates the context for a labeling engine run.

Since
QGIS 3.40

Definition at line 40 of file qgslabelingenginerule.h.

Constructor & Destructor Documentation

◆ QgsLabelingEngineContext() [1/2]

QgsLabelingEngineContext::QgsLabelingEngineContext ( QgsRenderContext renderContext)

Constructor for QgsLabelingEngineContext.

Definition at line 23 of file qgslabelingenginerule.cpp.

◆ QgsLabelingEngineContext() [2/2]

QgsLabelingEngineContext::QgsLabelingEngineContext ( const QgsLabelingEngineContext other)
delete

Member Function Documentation

◆ extent()

QgsRectangle QgsLabelingEngineContext::extent ( ) const

Returns the map extent defining the limits for labeling.

See also
mapBoundaryGeometry()
setExtent()

Definition at line 39 of file qgslabelingenginerule.cpp.

◆ mapBoundaryGeometry()

QgsGeometry QgsLabelingEngineContext::mapBoundaryGeometry ( ) const

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
setMapBoundaryGeometry()
extent()

Definition at line 29 of file qgslabelingenginerule.cpp.

◆ operator=()

QgsLabelingEngineContext & QgsLabelingEngineContext::operator= ( const QgsLabelingEngineContext other)
delete

◆ renderContext() [1/2]

QgsRenderContext & QgsLabelingEngineContext::renderContext ( )
inline

Returns a reference to the context's render context.

Definition at line 57 of file qgslabelingenginerule.h.

◆ renderContext() [2/2]

const QgsRenderContext & QgsLabelingEngineContext::renderContext ( ) const
inline

Returns a reference to the context's render context.

Note
Not available in Python bindings.

Definition at line 63 of file qgslabelingenginerule.h.

◆ setExtent()

void QgsLabelingEngineContext::setExtent ( const QgsRectangle extent)

Sets the map extent defining the limits for labeling.

See also
setMapBoundaryGeometry()
extent()

Definition at line 44 of file qgslabelingenginerule.cpp.

◆ setMapBoundaryGeometry()

void QgsLabelingEngineContext::setMapBoundaryGeometry ( const QgsGeometry geometry)

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
setExtent()
mapBoundaryGeometry()

Definition at line 34 of file qgslabelingenginerule.cpp.


The documentation for this class was generated from the following files: