Class: QgsAnimatedMarkerSymbolLayer

class qgis.core.QgsAnimatedMarkerSymbolLayer

Bases: QgsRasterMarkerSymbolLayer

Animated marker symbol layer class.

The QgsAnimatedMarkerSymbolLayer class renders frames from an animated raster image source (e.g. an animated GIF) during temporal animations or map exports.

New in version 3.26.

QgsAnimatedMarkerSymbolLayer(path: str = ‘’, size: float = DEFAULT_RASTERMARKER_SIZE, angle: float = DEFAULT_RASTERMARKER_ANGLE) Constructor for animated marker symbol layer using the specified source image path.

Methods

clone

rtype:

QgsAnimatedMarkerSymbolLayer

copyCommonProperties

Copies common properties to another layer.

copyDataDefinedProperties

Copies all data defined properties of this layer to another symbol layer.

copyPaintEffect

Copies paint effect of this layer to another symbol layer

create

Creates an animated marker symbol layer from a string map of properties.

frameRate

Returns the marker frame rate in frame per second.

layerType

rtype:

str

markerOffset

Calculates the required marker offset, including both the symbol offset and any displacement required to align with the marker's anchor point.

markerOffset2

markerOffsetWithWidthAndHeight

Calculates the required marker offset, including both the symbol offset and any displacement required to align with the marker's anchor point.

properties

rtype:

Dict[str, Any]

restoreOldDataDefinedProperties

Restores older data defined properties from string map.

setCommonProperties

Sets common class properties from a properties map.

setFrameRate

Sets the marker frame rate in frame per second.

startRender

param context:

clone(self) QgsAnimatedMarkerSymbolLayer
Return type:

QgsAnimatedMarkerSymbolLayer

copyCommonProperties(self, other: QgsRasterMarkerSymbolLayer)

Copies common properties to another layer.

New in version 3.26.

copyDataDefinedProperties(self, destLayer: QgsSymbolLayer)

Copies all data defined properties of this layer to another symbol layer.

Parameters:

destLayer – destination layer

copyPaintEffect(self, destLayer: QgsSymbolLayer)

Copies paint effect of this layer to another symbol layer

Parameters:

destLayer – destination layer

New in version 2.9.

create(properties: Dict[str, Any] = {}) QgsSymbolLayer

Creates an animated marker symbol layer from a string map of properties.

Parameters:

properties (Dict[str) –

Return type:

QgsSymbolLayer

frameRate(self) float

Returns the marker frame rate in frame per second.

See also

setFrameRate()

Return type:

float

layerType(self) str
Return type:

str

markerOffset(self, context: QgsSymbolRenderContext) Tuple[float, float]

Calculates the required marker offset, including both the symbol offset and any displacement required to align with the marker’s anchor point.

Parameters:
  • context – symbol render context

  • offsetX – will be set to required horizontal offset (in painter units)

  • offsetY – will be set to required vertical offset (in painter units)

markerOffset2(self, context: QgsSymbolRenderContext, width: float, height: float, widthUnit: QgsUnitTypes.RenderUnit, heightUnit: QgsUnitTypes.RenderUnit, widthMapUnitScale: QgsMapUnitScale, heightMapUnitScale: QgsMapUnitScale) Tuple[float, float]

Note

available in Python bindings as markerOffset2

markerOffsetWithWidthAndHeight(self, context: QgsSymbolRenderContext, width: float, height: float) Tuple[float, float]

Calculates the required marker offset, including both the symbol offset and any displacement required to align with the marker’s anchor point.

Parameters:
  • context – symbol render context

  • width – marker width

  • height – marker height

  • offsetX – will be set to required horizontal offset (in painter units)

  • offsetY – will be set to required vertical offset (in painter units)

Note

available in Python as markerOffsetWithWidthAndHeight

properties(self) Dict[str, Any]
Return type:

Dict[str, Any]

restoreOldDataDefinedProperties(self, stringMap: Dict[str, Any])

Restores older data defined properties from string map.

New in version 3.0.

setCommonProperties(self, properties: Dict[str, Any])

Sets common class properties from a properties map.

New in version 3.26.

setFrameRate(self, rate: float)

Sets the marker frame rate in frame per second.

See also

frameRate()

Parameters:

rate (float) –

startRender(self, context: QgsSymbolRenderContext)
Parameters:

context (QgsSymbolRenderContext) –