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
- rtype
QgsAnimatedMarkerSymbolLayer
Copies common properties to another layer.
Copies all data defined properties of this layer to another symbol layer.
Copies paint effect of this layer to another symbol layer
Creates an animated marker symbol layer from a string map of
properties
.Returns the marker frame rate in frame per second.
- rtype
str
Calculates the required marker offset, including both the symbol offset and any displacement required to align with the marker's anchor point.
Calculates the required marker offset, including both the symbol offset and any displacement required to align with the marker's anchor point.
- rtype
Dict[str, Any]
Restores older data defined properties from string map.
Sets common class properties from a
properties
map.Sets the marker frame
rate
in frame per second.- param context
- clone(self) QgsAnimatedMarkerSymbolLayer ¶
- Return type
- 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
- frameRate(self) float ¶
Returns the marker frame rate in frame per second.
See also
- 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
- Parameters
rate (float) –
- startRender(self, context: QgsSymbolRenderContext)¶
- Parameters
context (QgsSymbolRenderContext) –