Class: QgsAnnotationPictureItem¶
An annotation item which renders a picture.
Added in version 3.40.
Class Hierarchy¶
Base classes¶
Abstract base class for annotation items which render annotations in a rectangular shape. |
|
Abstract base class for annotation items which are drawn with |
Methods
Returns the picture format. |
|
Returns |
|
Returns the path of the image used to render the item. |
|
Sets whether the aspect ratio of the picture will be retained. |
|
Sets the format and path of the image used to render the item. |
Static Methods
Creates a new polygon annotation item. |
- class qgis.core.QgsAnnotationPictureItem[source]¶
Bases:
QgsAnnotationRectItem
- __init__(format: Qgis.PictureFormat, path: str | None, bounds: QgsRectangle)
Constructor for QgsAnnotationPictureItem, rendering the specified image
path
within the specifiedbounds
geometry.- Parameters:
format (Qgis.PictureFormat)
path (Optional[str])
bounds (QgsRectangle)
- static create() QgsAnnotationPictureItem | None [source]¶
Creates a new polygon annotation item.
- Return type:
Optional[QgsAnnotationPictureItem]
- format(self) Qgis.PictureFormat [source]¶
Returns the picture format.
- Return type:
- lockAspectRatio(self) bool [source]¶
Returns
True
if the aspect ratio of the picture will be retained.See also
- Return type:
bool
- path(self) str [source]¶
Returns the path of the image used to render the item.
See also
- Return type:
str
- setLockAspectRatio(self, locked: bool)[source]¶
Sets whether the aspect ratio of the picture will be retained.
See also
- Parameters:
locked (bool)
- setPath(self, format: Qgis.PictureFormat, path: str | None)[source]¶
Sets the
format
andpath
of the image used to render the item.See also
See also
- Parameters:
format (Qgis.PictureFormat)
path (Optional[str])