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

layerType

rtype:

str

mapUnitScale

rtype:

QgsMapUnitScale

outputUnit

rtype:

QgsUnitTypes.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]

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:

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

New in version 2.9.

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

layerType(self) str
Return type:

str

mapUnitScale(self) QgsMapUnitScale
Return type:

QgsMapUnitScale

outputUnit(self) QgsUnitTypes.RenderUnit
Return type:

QgsUnitTypes.RenderUnit

pointOnAllParts(self) bool

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

New in version 2.16.

Return type:

bool

pointOnSurface(self) bool
Return type:

bool

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

Dict[str, Any]

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

Restores older data defined properties from string map.

New in version 3.0.

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: QgsUnitTypes.RenderUnit)
Parameters:

unit (QgsUnitTypes.RenderUnit) –

setPointOnAllParts(self, pointOnAllParts: bool)

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

New in version 2.16.

Parameters:

pointOnAllParts (bool) –

setPointOnSurface(self, pointOnSurface: bool)
Parameters:

pointOnSurface (bool) –

setSubSymbol(self, symbol: QgsSymbol) bool
Parameters:

symbol (QgsSymbol) –

Return type:

bool

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