Class: QgsAnnotationPolygonItem¶
An annotation item which renders a fill symbol for a polygon 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 polygon item. |
|
Returns the symbol used to render the item. |
Static Methods
Creates a new polygon annotation item. |
- class qgis.core.QgsAnnotationPolygonItem[source]¶
Bases:
QgsAnnotationItem
- __init__(polygon: QgsCurvePolygon | None)
Constructor for QgsAnnotationPolygonItem, with the specified
polygon
geometry.- Parameters:
polygon (Optional[QgsCurvePolygon])
- static create() QgsAnnotationPolygonItem | None [source]¶
Creates a new polygon annotation item.
- Return type:
Optional[QgsAnnotationPolygonItem]
- geometry(self) QgsCurvePolygon | None [source]¶
Returns the geometry of the item.
The coordinate reference system for the polygon will be the parent layer’s
QgsAnnotationLayer.crs()
.See also
- Return type:
Optional[QgsCurvePolygon]
- setGeometry(self, geometry: QgsCurvePolygon | None)[source]¶
Sets the
geometry
of the item.The coordinate reference system for the polygon will be the parent layer’s
QgsAnnotationLayer.crs()
.See also
- Parameters:
geometry (Optional[QgsCurvePolygon])
- setSymbol(self, symbol: QgsFillSymbol | None)[source]¶
Sets the
symbol
used to render the polygon item.The item takes ownership of the symbol.
See also
- Parameters:
symbol (Optional[QgsFillSymbol])
- symbol(self) QgsFillSymbol | None [source]¶
Returns the symbol used to render the item.
See also
- Return type:
Optional[QgsFillSymbol]