Class: QgsCentroidFillSymbolLayer

class qgis.core.QgsCentroidFillSymbolLayer

Bases: QgsFillSymbolLayer

Methods

clone

rtype

QgsCentroidFillSymbolLayer

color

rtype

QColor

copyDataDefinedProperties

copyPaintEffect

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, str]

renderPolygon

param points

restoreOldDataDefinedProperties

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

startRender

param context

stopRender

param context

subSymbol

rtype

QgsSymbol

toSld

param doc

usedAttributes

param context

clone(self) → QgsCentroidFillSymbolLayer
Return type

QgsCentroidFillSymbolLayer

color(self) → QColor
Return type

QColor

copyDataDefinedProperties()
copyPaintEffect()
create(properties: Dict[str, str] = {}) → 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, str]
Return type

Dict[str, str]

renderPolygon(self, points: QPolygonF, rings: Iterable[QPolygonF], context: QgsSymbolRenderContext)
Parameters
restoreOldDataDefinedProperties()
setColor(self, color: Union[QColor, Qt.GlobalColor])
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

startRender(self, context: QgsSymbolRenderContext)
Parameters

context (QgsSymbolRenderContext) –

stopRender(self, context: QgsSymbolRenderContext)
Parameters

context (QgsSymbolRenderContext) –

subSymbol(self) → QgsSymbol
Return type

QgsSymbol

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

  • element (QDomElement) –

  • props (Dict[str) –

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

context (QgsRenderContext) –

Return type

Set[str]