Subgroup: Geometry

Class: QgsGeometryGeneratorSymbolLayer

class qgis.core.QgsGeometryGeneratorSymbolLayer

Bases: qgis._core.QgsSymbolLayer

Methods

clone
color The fill color.
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
dataDefinedProperties Returns a reference to the symbol layer’s property collection, used for data defined overrides.
drawPreviewIcon
dxfAngle get angle
dxfBrushColor get brush/fill color
dxfBrushStyle get brush/fill style
dxfColor get color
dxfCustomDashPattern get dash pattern
dxfOffset get offset
dxfPenStyle get pen style
dxfWidth get line width
enabled Returns true if symbol layer is enabled and will be drawn.
estimateMaxBleed Returns the estimated maximum distance which the layer style will bleed outside the drawn shape when drawn in the specified /a context.
fillColor Get fill color.
geometryExpression Get the expression to generate this geometry.
isCompatibleWithSymbol Will always return true.
isLocked
layerType
mapUnitScale
ogrFeatureStyle
outputUnit Returns the units to use for sizes and widths within the symbol layer.
paintEffect Returns the current paint effect for the layer.
prepareExpressions Prepares all data defined property expressions for evaluation.
properties
propertyDefinitions Returns the symbol layer property definitions.
render Will render this symbol layer using the context.
renderingPass
restoreOldDataDefinedProperties Restores older data defined properties from string map.
setColor
setDataDefinedProperties Sets the symbol layer’s property collection, used for data defined overrides.
setDataDefinedProperty Sets a data defined property for the layer.
setEnabled Sets whether symbol layer is enabled and should be drawn.
setFillColor Set fill color.
setGeometryExpression Set the expression to generate this geometry.
setLocked
setMapUnitScale
setOutputUnit Sets the units to use for sizes and widths within the symbol layer.
setPaintEffect Sets the current paint effect for the layer.
setRenderingPass
setStrokeColor Set stroke color.
setSubSymbol
setSymbolType Set the type of symbol which should be created.
startRender
stopRender
strokeColor Get stroke color.
subSymbol
symbolType Access the symbol type.
toSld
type
usedAttributes
writeDxf write as DXF

Attributes

PropertyAngle
PropertyArrowHeadLength
PropertyArrowHeadThickness
PropertyArrowHeadType
PropertyArrowStartWidth
PropertyArrowType
PropertyArrowWidth
PropertyBlurRadius
PropertyCapStyle
PropertyCharacter
PropertyCoordinateMode
PropertyCustomDash
PropertyDisplacementX
PropertyDisplacementY
PropertyDistanceX
PropertyDistanceY
PropertyFile
PropertyFillColor
PropertyFillStyle
PropertyGradientReference1IsCentroid
PropertyGradientReference1X
PropertyGradientReference1Y
PropertyGradientReference2IsCentroid
PropertyGradientReference2X
PropertyGradientReference2Y
PropertyGradientSpread
PropertyGradientType
PropertyHeight
PropertyHorizontalAnchor
PropertyInterval
PropertyJoinStyle
PropertyLayerEnabled
PropertyLineAngle
PropertyLineDistance
PropertyName
PropertyOffset
PropertyOffsetAlongLine
PropertyOpacity
PropertyPlacement
PropertyPreserveAspectRatio
PropertySecondaryColor
PropertyShapeburstIgnoreRings
PropertyShapeburstMaxDistance
PropertyShapeburstUseWholeShape
PropertySize
PropertyStrokeColor
PropertyStrokeStyle
PropertyStrokeWidth
PropertyVerticalAnchor
PropertyWidth
clone(self) → QgsSymbolLayer
create(properties: Dict[str, str]) → QgsSymbolLayer
drawPreviewIcon(self, context: QgsSymbolRenderContext, size: QSize)
geometryExpression(self) → str

Get the expression to generate this geometry.

isCompatibleWithSymbol(self, symbol: QgsSymbol) → bool

Will always return true. This is a hybrid layer, it constructs its own geometry so it does not care about the geometry of its parents.

layerType(self) → str
properties(self) → Dict[str, str]
render(self, context: QgsSymbolRenderContext)

Will render this symbol layer using the context. In comparison to other symbols there is no geometry passed in, since the geometry will be created based on information from the context which contains a QgsRenderContext which in turn contains an expression context which is available to the evaluated expression.

Parameters:context – The rendering context which will be used to render and to

construct a geometry.

setColor(self, color: Union[QColor, Qt.GlobalColor])
setGeometryExpression(self, exp: str)

Set the expression to generate this geometry.

setSubSymbol(self, symbol: QgsSymbol) → bool
setSymbolType(self, symbolType: QgsSymbol.SymbolType)

Set the type of symbol which should be created. Should match with the return type of the expression.

Parameters:symbolType – The symbol type which shall be used below this symbol.
startRender(self, context: QgsSymbolRenderContext)
stopRender(self, context: QgsSymbolRenderContext)
subSymbol(self) → QgsSymbol
symbolType(self) → QgsSymbol.SymbolType

Access the symbol type. This defines the type of geometry that is created by this generator.

Returns:Symbol type
usedAttributes(self, context: QgsRenderContext) → Set[str]