Class: QgsSvgAnnotation

An annotation which renders the contents of an SVG file.

Class Hierarchy

Inheritance diagram of qgis.core.QgsSvgAnnotation

Base classes

QgsAnnotation

Abstract base class for annotation items which are drawn over a map.

QObject

Methods

filePath

Returns the file path for the source SVG file.

setFilePath

Sets the file path for the source SVG file.

Static Methods

create

Returns a new QgsSvgAnnotation object.

class qgis.core.QgsSvgAnnotation[source]

Bases: QgsAnnotation

__init__(parent: QObject | None = None)

Constructor for QgsSvgAnnotation.

Parameters:

parent (Optional[QObject] = None)

static create() QgsSvgAnnotation | None[source]

Returns a new QgsSvgAnnotation object.

Return type:

Optional[QgsSvgAnnotation]

filePath(self) str[source]

Returns the file path for the source SVG file.

See also

setFilePath()

Return type:

str

setFilePath(self, file: str | None)[source]

Sets the file path for the source SVG file.

See also

filePath()

Parameters:

file (Optional[str])