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
- rtype
str
- rtype
QgsMapUnitScale
- rtype
QgsUnitTypes.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]
- 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
- 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
New in version 2.9.
- 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
- layerType(self) → str¶
- Return type
str
- mapUnitScale(self) → QgsMapUnitScale¶
- Return type
- outputUnit(self) → QgsUnitTypes.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
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
points (QPolygonF) –
rings (Iterable[QPolygonF]) –
context (QgsSymbolRenderContext) –
- 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.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: 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.
See also
New in version 2.16.
- Parameters
pointOnAllParts (bool) –
- setPointOnSurface(self, pointOnSurface: bool)¶
- Parameters
pointOnSurface (bool) –
- 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