Class: QgsFillSymbolLayer¶
- class qgis.core.QgsFillSymbolLayer(locked: bool = False)¶
Bases:
QgsSymbolLayer
Methods
Returns the rotation angle of the fill symbol, in degrees clockwise.
Copies all data defined properties of this layer to another symbol layer.
Copies paint effect of this layer to another symbol layer
- param context:
When rendering, install masks on
context
painter ifrecursive
isTrue
masks are installed recursively for all children symbol layersWhen rendering, remove previously installed masks from
context
painter ifrecursive
isTrue
masks are removed recursively for all children symbol layersRenders the fill symbol layer for the polygon whose outer ring is defined by
points
, using the given rendercontext
.Restores older data defined properties from string map.
Sets the rotation
angle
of the pattern, in degrees clockwise.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
- 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
New in version 2.9.
- drawPreviewIcon(self, context: QgsSymbolRenderContext, size: QSize)¶
- Parameters:
context (QgsSymbolRenderContext) –
size (QSize) –
- 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.
- 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)¶
Renders the fill symbol layer for the polygon whose outer ring is defined by
points
, using the given rendercontext
.The
rings
argument optionally specifies a list of polygon rings to render as holes.- 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.
- setAngle(self, angle: float)¶
Sets the rotation
angle
of the pattern, in degrees clockwise.Note
Not all fill symbol layers support rotation.
See also
- Parameters:
angle (float) –
- 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.