Class: QgsFilledMarkerSymbolLayer

class qgis.core.QgsFilledMarkerSymbolLayer(shape: QgsSimpleMarkerSymbolLayerBase.Shape = QgsSimpleMarkerSymbolLayerBase.Circle, size: float = DEFAULT_SIMPLEMARKER_SIZE, angle: float = DEFAULT_SIMPLEMARKER_ANGLE, scaleMethod: QgsSymbol.ScaleMethod = DEFAULT_SCALE_METHOD)

Bases: QgsSimpleMarkerSymbolLayerBase

Constructor for QgsFilledMarkerSymbolLayer.

Parameters
  • shape (QgsSimpleMarkerSymbolLayerBase.Shape = QgsSimpleMarkerSymbolLayerBase.Circle) – symbol shape

  • size (float = DEFAULT_SIMPLEMARKER_SIZE) – symbol size (in mm)

  • angle (float = DEFAULT_SIMPLEMARKER_ANGLE) – symbol rotation angle

  • scaleMethod (QgsSymbol.ScaleMethod = DEFAULT_SCALE_METHOD) – size scaling method

Filled marker symbol layer, consisting of a shape which is rendered using a QgsFillSymbol. This allows the symbol to support advanced styling of the interior and stroke of the shape.

Methods

calculateOffsetAndRotation

calculateSize

clone

rtype

QgsFilledMarkerSymbolLayer

color

rtype

QColor

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 a new QgsFilledMarkerSymbolLayer.

draw

estimateMaxBleed

param context

hasDataDefinedProperties

rtype

bool

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.

prepareMarkerPath

prepareMarkerShape

properties

rtype

Dict[str, str]

restoreOldDataDefinedProperties

Restores older data defined properties from string map.

setColor

param c

setSubSymbol

param symbol

shapeToPolygon

startRender

param context

stopRender

param context

subSymbol

rtype

QgsSymbol

usedAttributes

param context

calculateOffsetAndRotation()
calculateSize()
clone(self)QgsFilledMarkerSymbolLayer
Return type

QgsFilledMarkerSymbolLayer

color(self) → QColor
Return type

QColor

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

Creates a new QgsFilledMarkerSymbolLayer.

Parameters

properties (Dict[str) – a property map containing symbol properties (see properties())

Return type

QgsSymbolLayer

Returns

new QgsFilledMarkerSymbolLayer

draw()
estimateMaxBleed(self, context: QgsRenderContext) → float
Parameters

context (QgsRenderContext) –

Return type

float

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

prepareMarkerPath()
prepareMarkerShape()
properties(self) → Dict[str, str]
Return type

Dict[str, str]

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

Restores older data defined properties from string map.

New in version 3.0.

setColor(self, c: Union[QColor, Qt.GlobalColor])
Parameters

c (Union[QColor) –

setSubSymbol(self, symbol: QgsSymbol) → bool
Parameters

symbol (QgsSymbol) –

Return type

bool

shapeToPolygon()
startRender(self, context: QgsSymbolRenderContext)
Parameters

context (QgsSymbolRenderContext) –

stopRender(self, context: QgsSymbolRenderContext)
Parameters

context (QgsSymbolRenderContext) –

subSymbol(self)QgsSymbol
Return type

QgsSymbol

usedAttributes(self, context: QgsRenderContext) → Set[str]
Parameters

context (QgsRenderContext) –

Return type

Set[str]