QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Represents the calculated placement of a map label. More...
#include <qgslabelposition.h>
Public Member Functions | |
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... | |
Public Attributes | |
QVector< QgsPointXY > | cornerPoints |
QgsFeatureId | featureId = FID_NULL |
ID of feature associated with this label. More... | |
long long | groupedLabelId = 0 |
If non zero, indicates that the label position is part of a group of label positions (i.e. More... | |
double | height = 0 |
Heeght of label bounding box, in map units. More... | |
bool | isDiagram = false |
true if label is a diagram. More... | |
bool | isPinned = false |
true if label position has been pinned. More... | |
bool | isUnplaced = false |
true if label position corresponds to an unplaced label. More... | |
QFont | labelFont |
Font which the label is rendered using. More... | |
QgsGeometry | labelGeometry |
A polygon geometry representing the label's bounds in map coordinates. More... | |
QgsRectangle | labelRect |
QString | labelText |
String shown in label. More... | |
QString | layerID |
ID of associated map layer. More... | |
QString | providerID |
ID of the associated label provider. More... | |
double | rotation = 0 |
Rotation of label, in degrees clockwise. More... | |
bool | upsideDown = false |
true if label is upside down. More... | |
double | width = 0 |
Width of label bounding box, in map units. More... | |
Represents the calculated placement of a map label.
Definition at line 33 of file qgslabelposition.h.
|
inline |
Constructor for QgsLabelPosition.
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.
|
default |
Constructor for QgsLabelPosition.
QVector< QgsPointXY > QgsLabelPosition::cornerPoints |
Definition at line 96 of file qgslabelposition.h.
QgsFeatureId QgsLabelPosition::featureId = FID_NULL |
ID of feature associated with this label.
Definition at line 89 of file qgslabelposition.h.
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.
double QgsLabelPosition::height = 0 |
Heeght of label bounding box, in map units.
Definition at line 113 of file qgslabelposition.h.
bool QgsLabelPosition::isDiagram = false |
true
if label is a diagram.
Definition at line 138 of file qgslabelposition.h.
bool QgsLabelPosition::isPinned = false |
true
if label position has been pinned.
Definition at line 143 of file qgslabelposition.h.
bool QgsLabelPosition::isUnplaced = false |
true
if label position corresponds to an unplaced label.
Definition at line 155 of file qgslabelposition.h.
QFont QgsLabelPosition::labelFont |
Font which the label is rendered using.
Definition at line 128 of file qgslabelposition.h.
QgsGeometry QgsLabelPosition::labelGeometry |
A polygon geometry representing the label's bounds in map coordinates.
Definition at line 103 of file qgslabelposition.h.
QgsRectangle QgsLabelPosition::labelRect |
Definition at line 97 of file qgslabelposition.h.
QString QgsLabelPosition::labelText |
String shown in label.
Definition at line 123 of file qgslabelposition.h.
QString QgsLabelPosition::layerID |
ID of associated map layer.
Definition at line 118 of file qgslabelposition.h.
QString QgsLabelPosition::providerID |
ID of the associated label provider.
Definition at line 149 of file qgslabelposition.h.
double QgsLabelPosition::rotation = 0 |
Rotation of label, in degrees clockwise.
Definition at line 94 of file qgslabelposition.h.
bool QgsLabelPosition::upsideDown = false |
true
if label is upside down.
Definition at line 133 of file qgslabelposition.h.
double QgsLabelPosition::width = 0 |
Width of label bounding box, in map units.
Definition at line 108 of file qgslabelposition.h.