Class: QgsAnnotationLineItem¶
- class qgis.core.QgsAnnotationLineItem(curve: QgsCurve)¶
Bases:
QgsAnnotationItem
Constructor for
QgsAnnotationLineItem
, with the specifiedlinestring
.An annotation item which renders a line symbol along a line geometry.
New in version 3.16:
Methods
- rtype
QgsRectangle
- rtype
QgsAnnotationLineItem
Creates a new linestring annotation item.
Returns the geometry of the item.
- param element
- param context
Sets the
geometry
of the item.Sets the
symbol
used to render the marker item.Returns the symbol used to render the item.
- rtype
str
- param element
- boundingBox(self) QgsRectangle ¶
- Return type
- clone(self) QgsAnnotationLineItem ¶
- Return type
- create() QgsAnnotationLineItem ¶
Creates a new linestring annotation item.
- Return type
- geometry(self) QgsCurve ¶
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
- readXml(self, element: QDomElement, context: QgsReadWriteContext) bool ¶
- Parameters
element (QDomElement) –
context (QgsReadWriteContext) –
- Return type
bool
- render(self, context: QgsRenderContext, feedback: QgsFeedback)¶
- Parameters
context (QgsRenderContext) –
feedback (QgsFeedback) –
- setGeometry(self, geometry: QgsCurve)¶
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 (QgsCurve) –
- setSymbol(self, symbol: QgsLineSymbol)¶
Sets the
symbol
used to render the marker item.The item takes ownership of the symbol.
See also
- Parameters
symbol (QgsLineSymbol) –
- symbol(self) QgsLineSymbol ¶
Returns the symbol used to render the item.
See also
- Return type
- type(self) str ¶
- Return type
str
- writeXml(self, element: QDomElement, document: QDomDocument, context: QgsReadWriteContext) bool ¶
- Parameters
element (QDomElement) –
document (QDomDocument) –
context (QgsReadWriteContext) –
- Return type
bool