Class: QgsMaskMarkerSymbolLayer¶
- class qgis.core.QgsMaskMarkerSymbolLayer¶
Bases:
QgsMarkerSymbolLayer
Simple constructor
Special symbol layer that uses its sub symbol as a selective mask
New in version 3.12:
Methods
- param point
- rtype
QgsMaskMarkerSymbolLayer
Copies all data defined properties of this layer to another symbol layer.
Copies paint effect of this layer to another symbol layer
Create a new QgsMaskMarkerSymbolLayer
- param context
Whether some masked symbol layers are defined
- rtype
bool
- 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.
Returns a list of references to symbol layers that are masked by the sub symbol's shape.
- rtype
Dict[str, str]
- param point
Restores older data defined properties from string map.
Sets the symbol layers that will be masked by the sub symbol's shape.
- param symbol
- param context
- param context
- rtype
QgsSymbol
- param context
- rtype
bool
- bounds(self, point: Union[QPointF, QPoint], context: QgsSymbolRenderContext) QRectF ¶
- Parameters
point (Union[QPointF) –
context (QgsSymbolRenderContext) –
- Return type
QRectF
- clone(self) QgsMaskMarkerSymbolLayer ¶
- Return type
- 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, str] = {}) QgsSymbolLayer ¶
Create a new QgsMaskMarkerSymbolLayer
- Parameters
properties (Dict[str) – A property map to deserialize saved information from
properties()
- Return type
- Returns
A new QgsMaskMarkerSymbolLayer
- drawPreviewIcon(self, context: QgsSymbolRenderContext, size: QSize)¶
- Parameters
context (QgsSymbolRenderContext) –
size (QSize) –
- enabled(self) bool ¶
Whether some masked symbol layers are defined
- Return type
bool
- hasDataDefinedProperties(self) bool ¶
- Return type
bool
- 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
- masks(self) List[QgsSymbolLayerReference] ¶
Returns a list of references to symbol layers that are masked by the sub symbol’s shape.
- Return type
List[QgsSymbolLayerReference]
- Returns
a list of references to masked symbol layers
See also
- properties(self) Dict[str, str] ¶
- Return type
Dict[str, str]
- renderPoint(self, point: Union[QPointF, QPoint], context: QgsSymbolRenderContext)¶
- Parameters
point (Union[QPointF) –
context (QgsSymbolRenderContext) –
- restoreOldDataDefinedProperties(self, stringMap: Dict[str, str])¶
Restores older data defined properties from string map.
New in version 3.0.
- setMasks(self, maskedLayers: Iterable[QgsSymbolLayerReference])¶
Sets the symbol layers that will be masked by the sub symbol’s shape.
- Parameters
maskedLayers (Iterable[QgsSymbolLayerReference]) – list of references to symbol layers
See also
- startRender(self, context: QgsSymbolRenderContext)¶
- Parameters
context (QgsSymbolRenderContext) –
- stopRender(self, context: QgsSymbolRenderContext)¶
- Parameters
context (QgsSymbolRenderContext) –
- usedAttributes(self, context: QgsRenderContext) Set[str] ¶
- Parameters
context (QgsRenderContext) –
- Return type
Set[str]
- usesMapUnits(self) bool ¶
- Return type
bool