Represents the calculated placement of a map label.
More...
#include <qgslabelposition.h>
|
| QgsLabelPosition ()=default |
| Constructor for QgsLabelPosition. More...
|
|
| QgsLabelPosition (QgsFeatureId id, double r, const QVector< QgsPointXY > &corners, const QgsRectangle &rect, double w, double h, const QString &layer, const QString &labeltext, const QFont &labelfont, bool upside_down, bool diagram=false, bool pinned=false, const QString &providerId=QString(), const QgsGeometry &labelGeometry=QgsGeometry(), bool isUnplaced=false) |
| Constructor for QgsLabelPosition. More...
|
|
Represents the calculated placement of a map label.
Definition at line 33 of file qgslabelposition.h.
◆ QgsLabelPosition() [1/2]
QgsLabelPosition::QgsLabelPosition |
( |
QgsFeatureId |
id, |
|
|
double |
r, |
|
|
const QVector< QgsPointXY > & |
corners, |
|
|
const QgsRectangle & |
rect, |
|
|
double |
w, |
|
|
double |
h, |
|
|
const QString & |
layer, |
|
|
const QString & |
labeltext, |
|
|
const QFont & |
labelfont, |
|
|
bool |
upside_down, |
|
|
bool |
diagram = false , |
|
|
bool |
pinned = false , |
|
|
const QString & |
providerId = QString() , |
|
|
const QgsGeometry & |
labelGeometry = QgsGeometry() , |
|
|
bool |
isUnplaced = false |
|
) |
| |
|
inline |
Constructor for QgsLabelPosition.
- Parameters
-
id | associated feature ID |
r | label rotation in degrees clockwise |
corners | corner points of label bounding box, in map units |
rect | label bounding box, in map units |
w | width of label, in map units |
h | height of label, in map units |
layer | ID of associated map layer |
labeltext | text rendered for label |
labelfont | font used to render label |
upside_down | true if label is upside down |
diagram | true if label is a diagram |
pinned | true if label has pinned placement |
providerId | ID of associated label provider |
labelGeometry | polygon geometry of label boundary |
isUnplaced | set to true if label was unplaced (e.g. due to collisions with other labels) |
Definition at line 55 of file qgslabelposition.h.
◆ QgsLabelPosition() [2/2]
QgsLabelPosition::QgsLabelPosition |
( |
| ) |
|
|
default |
◆ cornerPoints
QVector< QgsPointXY > QgsLabelPosition::cornerPoints |
◆ featureId
◆ groupedLabelId
long long QgsLabelPosition::groupedLabelId = 0 |
If non zero, indicates that the label position is part of a group of label positions (i.e.
a character in a curved label).
All other linked positions will share the same groupedLabelId.
Definition at line 162 of file qgslabelposition.h.
◆ height
double QgsLabelPosition::height = 0 |
◆ isDiagram
bool QgsLabelPosition::isDiagram = false |
◆ isPinned
bool QgsLabelPosition::isPinned = false |
◆ isUnplaced
bool QgsLabelPosition::isUnplaced = false |
true
if label position corresponds to an unplaced label.
- Since
- QGIS 3.10
Definition at line 155 of file qgslabelposition.h.
◆ labelFont
QFont QgsLabelPosition::labelFont |
◆ labelGeometry
A polygon geometry representing the label's bounds in map coordinates.
- Since
- QGIS 3.4.9
Definition at line 103 of file qgslabelposition.h.
◆ labelRect
◆ labelText
QString QgsLabelPosition::labelText |
◆ layerID
QString QgsLabelPosition::layerID |
◆ providerID
QString QgsLabelPosition::providerID |
◆ rotation
double QgsLabelPosition::rotation = 0 |
◆ upsideDown
bool QgsLabelPosition::upsideDown = false |
◆ width
double QgsLabelPosition::width = 0 |
The documentation for this class was generated from the following file: