Class: QgsCentroidFillSymbolLayer

class qgis.core.QgsCentroidFillSymbolLayer

Bases: QgsFillSymbolLayer

Methods

canCauseArtifactsBetweenAdjacentTiles

rtype:

bool

clipOnCurrentPartOnly

Returns True if point markers should be clipped to the current part boundary only.

clipPoints

Returns True if point markers should be clipped to the polygon boundary.

clone

rtype:

QgsCentroidFillSymbolLayer

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 QgsCentroidFillSymbolLayer using the specified properties map containing symbol properties (see properties()).

createFromSld

param element:

hasDataDefinedProperties

rtype:

bool

installMasks

When rendering, install masks on context painter if recursive is True masks are installed recursively for all children symbol layers

layerType

rtype:

str

mapUnitScale

rtype:

QgsMapUnitScale

outputUnit

rtype:

Qgis.RenderUnit

pointOnAllParts

Returns whether a point is drawn for all parts or only on the biggest part of multi-part features.

pointOnSurface

rtype:

bool

properties

rtype:

Dict[str, Any]

removeMasks

When rendering, remove previously installed masks from context painter if recursive is True masks are removed recursively for all children symbol layers

renderPolygon

param points:

restoreOldDataDefinedProperties

Restores older data defined properties from string map.

setClipOnCurrentPartOnly

Sets whether point markers should be clipped to the current part boundary only.

setClipPoints

Sets whether point markers should be clipped to the polygon boundary.

setColor

param color:

setMapUnitScale

param scale:

setOutputUnit

param unit:

setPointOnAllParts

Sets whether a point is drawn for all parts or only on the biggest part of multi-part features.

setPointOnSurface

param pointOnSurface:

setSubSymbol

param symbol:

shouldRenderUsingSelectionColor

Returns True if the symbol layer should be rendered using the selection color from the render context.

startFeatureRender

param feature:

startRender

param context:

stopFeatureRender

param feature:

stopRender

param context:

subSymbol

rtype:

QgsSymbol

toSld

param doc:

usedAttributes

param context:

usesMapUnits

rtype:

bool

canCauseArtifactsBetweenAdjacentTiles(self) bool
Return type:

bool

clipOnCurrentPartOnly(self) bool

Returns True if point markers should be clipped to the current part boundary only.

See also

setClipPoints()

New in version 3.14.

Return type:

bool

clipPoints(self) bool

Returns True if point markers should be clipped to the polygon boundary.

See also

setClipPoints()

New in version 3.14.

Return type:

bool

clone(self) QgsCentroidFillSymbolLayer
Return type:

QgsCentroidFillSymbolLayer

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

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

Creates a new QgsCentroidFillSymbolLayer using the specified properties map containing symbol properties (see properties()).

Caller takes ownership of the returned symbol layer.

Parameters:

properties (Dict[str) –

Return type:

QgsSymbolLayer

createFromSld(element: QDomElement) QgsSymbolLayer
Parameters:

element (QDomElement) –

Return type:

QgsSymbolLayer

hasDataDefinedProperties(self) bool
Return type:

bool

installMasks(self, context: QgsRenderContext, recursive: bool)

When rendering, install masks on context painter if recursive is True masks are installed recursively for all children symbol layers

See also

prepareMasks()

See also

removeMasks()

New in version 3.30.

layerType(self) str
Return type:

str

mapUnitScale(self) QgsMapUnitScale
Return type:

QgsMapUnitScale

outputUnit(self) Qgis.RenderUnit
Return type:

Qgis.RenderUnit

pointOnAllParts(self) bool

Returns whether a point is drawn for all parts or only on the biggest part of multi-part features.

Return type:

bool

pointOnSurface(self) bool
Return type:

bool

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

Dict[str, Any]

removeMasks(self, context: QgsRenderContext, recursive: bool)

When rendering, remove previously installed masks from context painter if recursive is True masks are removed recursively for all children symbol layers

See also

prepareMasks()

See also

installMasks()

New in version 3.30.

renderPolygon(self, points: QPolygonF, rings: Iterable[QPolygonF], context: QgsSymbolRenderContext)
Parameters:
restoreOldDataDefinedProperties(self, stringMap: Dict[str, Any])

Restores older data defined properties from string map.

setClipOnCurrentPartOnly(self, clipOnCurrentPartOnly: bool)

Sets whether point markers should be clipped to the current part boundary only.

New in version 3.14.

Parameters:

clipOnCurrentPartOnly (bool) –

setClipPoints(self, clipPoints: bool)

Sets whether point markers should be clipped to the polygon boundary.

See also

clipPoints()

New in version 3.14.

Parameters:

clipPoints (bool) –

setColor(self, color: QColor | Qt.GlobalColor | QGradient)
Parameters:

color (Union[QColor) –

setMapUnitScale(self, scale: QgsMapUnitScale)
Parameters:

scale (QgsMapUnitScale) –

setOutputUnit(self, unit: Qgis.RenderUnit)
Parameters:

unit (Qgis.RenderUnit) –

setPointOnAllParts(self, pointOnAllParts: bool)

Sets whether a point is drawn for all parts or only on the biggest part of multi-part features.

Parameters:

pointOnAllParts (bool) –

setPointOnSurface(self, pointOnSurface: bool)
Parameters:

pointOnSurface (bool) –

setSubSymbol(self, symbol: QgsSymbol) bool
Parameters:

symbol (QgsSymbol) –

Return type:

bool

shouldRenderUsingSelectionColor(self, context: QgsSymbolRenderContext) bool

Returns True if the symbol layer should be rendered using the selection color from the render context.

New in version 3.34.

startFeatureRender(self, feature: QgsFeature, context: QgsRenderContext)
Parameters:
startRender(self, context: QgsSymbolRenderContext)
Parameters:

context (QgsSymbolRenderContext) –

stopFeatureRender(self, feature: QgsFeature, context: QgsRenderContext)
Parameters:
stopRender(self, context: QgsSymbolRenderContext)
Parameters:

context (QgsSymbolRenderContext) –

subSymbol(self) QgsSymbol
Return type:

QgsSymbol

toSld(self, doc: QDomDocument, element: QDomElement, props: Dict[str, Any])
Parameters:
  • doc (QDomDocument) –

  • element (QDomElement) –

  • props (Dict[str) –

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

context (QgsRenderContext) –

Return type:

Set[str]

usesMapUnits(self) bool
Return type:

bool