Class: QgsAnnotationLineItem¶
An annotation item which renders a line symbol along a line geometry.
Added in version 3.16.
Class Hierarchy¶
Base classes¶
Abstract base class for annotation items which are drawn with |
Methods
Returns the geometry of the item. |
|
Sets the geometry of the item. |
|
Sets the symbol used to render the marker item. |
|
Returns the symbol used to render the item. |
Static Methods
Creates a new linestring annotation item. |
- class qgis.core.QgsAnnotationLineItem[source]¶
Bases:
QgsAnnotationItem
- __init__(curve: QgsCurve | None)
Constructor for QgsAnnotationLineItem, with the specified
curve
.- Parameters:
curve (Optional[QgsCurve])
- static create() QgsAnnotationLineItem | None [source]¶
Creates a new linestring annotation item.
- Return type:
Optional[QgsAnnotationLineItem]
- geometry(self) QgsCurve | None [source]¶
Returns the geometry of the item.
The coordinate reference system for the line will be the parent layer’s
QgsAnnotationLayer.crs()
.See also
- Return type:
Optional[QgsCurve]
- setGeometry(self, geometry: QgsCurve | None)[source]¶
Sets the
geometry
of the item. Ownership ofgeometry
is transferred.The coordinate reference system for the line will be the parent layer’s
QgsAnnotationLayer.crs()
.See also
- Parameters:
geometry (Optional[QgsCurve])
- setSymbol(self, symbol: QgsLineSymbol | None)[source]¶
Sets the
symbol
used to render the marker item.The item takes ownership of the symbol.
See also
- Parameters:
symbol (Optional[QgsLineSymbol])
- symbol(self) QgsLineSymbol | None [source]¶
Returns the symbol used to render the item.
See also
- Return type:
Optional[QgsLineSymbol]