Class: QgsAnnotationMarkerItem¶
- class qgis.core.QgsAnnotationMarkerItem(point: QgsPoint)¶
Bases:
QgsAnnotationItem
Constructor for
QgsAnnotationMarkerItem
, at the specifiedpoint
.An annotation item which renders a marker symbol at a point location.
New in version 3.16:
Methods
- rtype
QgsRectangle
- rtype
QgsAnnotationMarkerItem
Creates a new marker annotation item.
Returns the point geometry of the marker.
- param element
- param context
Sets the point
geometry
location of the marker.Sets the
symbol
used to render the marker item.Returns the symbol used to render the marker item.
- rtype
str
- param element
- boundingBox(self) QgsRectangle ¶
- Return type
- clone(self) QgsAnnotationMarkerItem ¶
- Return type
- create() QgsAnnotationMarkerItem ¶
Creates a new marker annotation item.
- Return type
- geometry(self) QgsPointXY ¶
Returns the point geometry of the marker.
The coordinate reference system for the point 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: QgsPoint)¶
Sets the point
geometry
location of the marker.The coordinate reference system for the point will be the parent layer’s
QgsAnnotationLayer.crs()
.See also
- Parameters
geometry (QgsPoint) –
- setSymbol(self, symbol: QgsMarkerSymbol)¶
Sets the
symbol
used to render the marker item.The item takes ownership of the symbol.
See also
- Parameters
symbol (QgsMarkerSymbol) –
- symbol(self) QgsMarkerSymbol ¶
Returns the symbol used to render the marker 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