Class: QgsAnnotationPictureItem

An annotation item which renders a picture.

Added in version 3.40.

List of all members, including inherited members

Class Hierarchy

Inheritance diagram of qgis.core.QgsAnnotationPictureItem

Base classes

QgsAnnotationRectItem

Abstract base class for annotation items which render annotations in a rectangular shape.

QgsAnnotationItem

Abstract base class for annotation items which are drawn with QgsAnnotationLayers.

Constructor

__init__

Methods

billboard3DScaleMode

Returns the 3D billboard scale mode for the picture.

billboard3DSize

Returns the 3D billboard size for the picture.

format

Returns the picture format.

lockAspectRatio

Returns True if the aspect ratio of the picture will be retained.

path

Returns the path of the image used to render the item.

setBillboard3DScaleMode

Sets the 3D billboard scale mode for the picture.

setBillboard3DSize

Sets the 3D billboard size for the picture.

setLockAspectRatio

Sets whether the aspect ratio of the picture will be retained.

setPath

Sets the format and path of the image used to render the item.

Static Methods

create

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 specified bounds geometry.

Parameters:
billboard3DScaleMode(self) → Qgis.BillboardScaleMode[source]

Returns the 3D billboard scale mode for the picture.

Added in version 4.4.

Return type:

Qgis.BillboardScaleMode

billboard3DSize(self) → QSizeF[source]

Returns the 3D billboard size for the picture.

Added in version 4.4.

Return type:

QSizeF

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:

Qgis.PictureFormat

lockAspectRatio(self) → bool[source]

Returns True if the aspect ratio of the picture will be retained.

Return type:

bool

path(self) → str[source]

Returns the path of the image used to render the item.

See also

setPath()

Return type:

str

setBillboard3DScaleMode(self, mode: Qgis.BillboardScaleMode)[source]

Sets the 3D billboard scale mode for the picture.

Added in version 4.4.

Parameters:

mode (Qgis.BillboardScaleMode)

setBillboard3DSize(self, size: QSizeF)[source]

Sets the 3D billboard size for the picture.

Added in version 4.4.

Parameters:

size (QSizeF)

setLockAspectRatio(self, locked: bool)[source]

Sets whether the aspect ratio of the picture will be retained.

Parameters:

locked (bool)

setPath(self, format: Qgis.PictureFormat, path: str | None)[source]

Sets the format and path of the image used to render the item.

See also

path()

See also

format()

Parameters: