Class: QgsLabelPosition

class qgis.core.QgsLabelPosition(id: int, r: float, corners: Iterable[QgsPointXY], rect: QgsRectangle, w: float, h: float, layer: str, labeltext: str, labelfont: QFont, upside_down: bool, diagram: bool = False, pinned: bool = False, providerId: str = '', labelGeometry: QgsGeometry = QgsGeometry())

Bases: sip.wrapper

Constructor for QgsLabelPosition.

Parameters
  • id (int) – associated feature ID

  • r (float) – label rotation in degrees clockwise

  • corners (Iterable[QgsPointXY]) – corner points of label bounding box, in map units

  • rect (QgsRectangle) – label bounding box, in map units

  • w (float) – width of label, in map units

  • h (float) – height of label, in map units

  • layer (str) – ID of associated map layer

  • labeltext (str) – text rendered for label

  • labelfont (QFont) – font used to render label

  • upside_down (bool) – TRUE if label is upside down

  • diagram (bool = False) – TRUE if label is a diagram

  • pinned (bool = False) – TRUE if label has pinned placement

  • providerId (str = '') – ID of associated label provider

  • labelGeometry (QgsGeometry = QgsGeometry()) – polygon geometry of label boundary

QgsLabelPosition() Constructor for QgsLabelPosition

QgsLabelPosition(QgsLabelPosition)

cornerPoints
featureId
height
isDiagram
isPinned
labelFont
labelGeometry
labelRect
labelText
layerID
providerID
rotation
upsideDown
width