Class: QgsCentroidFillSymbolLayer¶
- class qgis.core.QgsCentroidFillSymbolLayer¶
Bases:
QgsFillSymbolLayer
Methods
- rtype:
bool
Returns
True
if point markers should be clipped to the current part boundary only.Returns
True
if point markers should be clipped to the polygon boundary.- rtype:
QgsCentroidFillSymbolLayer
- rtype:
QColor
Copies all data defined properties of this layer to another symbol layer.
Copies paint effect of this layer to another symbol layer
Creates a new
QgsCentroidFillSymbolLayer
using the specifiedproperties
map containing symbol properties (seeproperties()
).- param element:
- rtype:
bool
When rendering, install masks on
context
painter ifrecursive
isTrue
masks are installed recursively for all children symbol layers- rtype:
str
- rtype:
QgsMapUnitScale
- rtype:
Qgis.RenderUnit
Returns whether a point is drawn for all parts or only on the biggest part of multi-part features.
- rtype:
bool
- rtype:
Dict[str, Any]
When rendering, remove previously installed masks from
context
painter ifrecursive
isTrue
masks are removed recursively for all children symbol layers- param points:
Restores older data defined properties from string map.
Sets whether point markers should be
clipped
to the current part boundary only.Sets whether point markers should be
clipped
to the polygon boundary.- param color:
- param scale:
- param unit:
Sets whether a point is drawn for all parts or only on the biggest part of multi-part features.
- param pointOnSurface:
- param symbol:
Returns
True
if the symbol layer should be rendered using the selection color from the render context.- param feature:
- param context:
- param feature:
- param context:
- rtype:
QgsSymbol
- param doc:
- param context:
- 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
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
New in version 3.14.
- Return type:
bool
- clone(self) QgsCentroidFillSymbolLayer ¶
- Return type:
- 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 specifiedproperties
map containing symbol properties (seeproperties()
).Caller takes ownership of the returned symbol layer.
- Parameters:
properties (Dict[str) –
- Return type:
- createFromSld(element: QDomElement) QgsSymbolLayer ¶
- Parameters:
element (QDomElement) –
- Return type:
- hasDataDefinedProperties(self) bool ¶
- Return type:
bool
- installMasks(self, context: QgsRenderContext, recursive: bool)¶
When rendering, install masks on
context
painter ifrecursive
isTrue
masks are installed recursively for all children symbol layersSee also
prepareMasks()
See also
New in version 3.30.
- layerType(self) str ¶
- Return type:
str
- mapUnitScale(self) QgsMapUnitScale ¶
- Return type:
- outputUnit(self) Qgis.RenderUnit ¶
- Return type:
- pointOnAllParts(self) bool ¶
Returns whether a point is drawn for all parts or only on the biggest part of multi-part features.
See also
- 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 ifrecursive
isTrue
masks are removed recursively for all children symbol layersSee also
prepareMasks()
See also
New in version 3.30.
- renderPolygon(self, points: QPolygonF, rings: Iterable[QPolygonF], context: QgsSymbolRenderContext)¶
- Parameters:
points (QPolygonF) –
rings (Iterable[QPolygonF]) –
context (QgsSymbolRenderContext) –
- 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.See also
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
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.
See also
- Parameters:
pointOnAllParts (bool) –
- setPointOnSurface(self, pointOnSurface: bool)¶
- Parameters:
pointOnSurface (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:
feature (QgsFeature) –
context (QgsRenderContext) –
- startRender(self, context: QgsSymbolRenderContext)¶
- Parameters:
context (QgsSymbolRenderContext) –
- stopFeatureRender(self, feature: QgsFeature, context: QgsRenderContext)¶
- Parameters:
feature (QgsFeature) –
context (QgsRenderContext) –
- stopRender(self, context: QgsSymbolRenderContext)¶
- Parameters:
context (QgsSymbolRenderContext) –
- 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