Class: QgsFillSymbolLayer

class qgis.core.QgsFillSymbolLayer(locked: bool = False)

Bases: QgsSymbolLayer

Methods

angle

Returns the rotation angle of the fill symbol, in degrees clockwise.

copyDataDefinedProperties

Copies all data defined properties of this layer to another symbol layer.

copyPaintEffect

Copies paint effect of this layer to another symbol layer

drawPreviewIcon

param context:

installMasks

When rendering, install masks on context painter if recursive is True masks are installed recursively for all children symbol layers

removeMasks

When rendering, remove previously installed masks from context painter if recursive is True masks are removed recursively for all children symbol layers

renderPolygon

Renders the fill symbol layer for the polygon whose outer ring is defined by points, using the given render context.

restoreOldDataDefinedProperties

Restores older data defined properties from string map.

setAngle

Sets the rotation angle of the pattern, in degrees clockwise.

shouldRenderUsingSelectionColor

Returns True if the symbol layer should be rendered using the selection color from the render context.

toTiledPatternImage

Renders the symbol layer as an image that can be used as a seamless pattern fill for polygons, this method is used by SLD export to generate image tiles for ExternalGraphic polygon fills.

angle(self) float

Returns the rotation angle of the fill symbol, in degrees clockwise.

Note

Not all fill symbol layers support rotation.

See also

setAngle()

Return type:

float

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

drawPreviewIcon(self, context: QgsSymbolRenderContext, size: QSize)
Parameters:
installMasks(self, context: QgsRenderContext, recursive: bool)

When rendering, install masks on context painter if recursive is True masks are installed recursively for all children symbol layers

See also

prepareMasks()

See also

removeMasks()

New in version 3.30.

removeMasks(self, context: QgsRenderContext, recursive: bool)

When rendering, remove previously installed masks from context painter if recursive is True masks are removed recursively for all children symbol layers

See also

prepareMasks()

See also

installMasks()

New in version 3.30.

renderPolygon(self, points: QPolygonF, rings: Iterable[QPolygonF], context: QgsSymbolRenderContext)

Renders the fill symbol layer for the polygon whose outer ring is defined by points, using the given render context.

The rings argument optionally specifies a list of polygon rings to render as holes.

Parameters:
restoreOldDataDefinedProperties(self, stringMap: Dict[str, Any])

Restores older data defined properties from string map.

setAngle(self, angle: float)

Sets the rotation angle of the pattern, in degrees clockwise.

Note

Not all fill symbol layers support rotation.

See also

angle()

Parameters:

angle (float) –

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.

toTiledPatternImage(self) QImage

Renders the symbol layer as an image that can be used as a seamless pattern fill for polygons, this method is used by SLD export to generate image tiles for ExternalGraphic polygon fills.

The default implementation returns a null image.

Return type:

QImage

Returns:

the tile image (not necessarily a square) or a null image if not implemented.

New in version 3.30.