Skip to content

Commit 0c62390

Browse files
committed
sip binding for QgsLabelingEngineInterface::labelsWithinRect()
qgis.utils.iface.mapCanvas().mapRenderer().labelingEngine().labelsWithinRect(some_extent) can now return all labels shown within the canvas (if that's the extent given).
1 parent c668c5d commit 0c62390

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

python/core/qgsmaprenderer.sip

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ public:
2828
//! return infos about labels at a given (map) position
2929
//! @note: this method was added in version 1.7
3030
virtual QList<QgsLabelPosition> labelsAtPosition( const QgsPoint& p )= 0;
31+
//! return infos about labels within a given (map) rectangle
32+
//! @note: this method was added in version 1.9
33+
virtual QList<QgsLabelPosition> labelsWithinRect( const QgsRectangle& r ) = 0;
3134

3235

3336
//! called when passing engine among map renderers

src/core/qgsmaprenderer.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ class QgsLabelingEngineInterface
8989
//! return infos about labels at a given (map) position
9090
//! @note: this method was added in version 1.7
9191
virtual QList<QgsLabelPosition> labelsAtPosition( const QgsPoint& p ) = 0;
92+
//! return infos about labels within a given (map) rectangle
93+
//! @note: this method was added in version 1.9
94+
virtual QList<QgsLabelPosition> labelsWithinRect( const QgsRectangle& r ) = 0;
9295

9396
//! called when passing engine among map renderers
9497
virtual QgsLabelingEngineInterface* clone() = 0;

0 commit comments

Comments
 (0)