Class: QgsFillSymbolLayer¶
Abstract base class for fill symbol layers.
Note
This is an abstract class, with methods which must be implemented by a subclass.
The following methods must be implemented: QgsSymbolLayer.clone(), QgsSymbolLayer.layerType(), QgsSymbolLayer.properties(), renderPolygon(), QgsSymbolLayer.startRender(), QgsSymbolLayer.stopRender()
Class Hierarchy¶
Base classes¶
Abstract base class for symbol layers.  | 
Subclasses¶
A fill symbol layer which renders a marker symbol at the centroid of a polygon geometry.  | 
|
A fill symbol layer which draws a smooth color gradient over a polygon.  | 
|
Base class for fill symbol layers which fill polygons with a repeated image.  | 
|
A fill symbol layer which places markers at random locations within polygons.  | 
|
A fill symbol layer which applies a gradient from the outer edges of a symbol to the inside.  | 
|
Renders polygons using a single fill and stroke color.  | 
Abstract Methods
Renders the fill symbol layer for the polygon whose outer ring is defined by points, using the given render context.  | 
Methods
Returns the rotation angle of the fill symbol, in degrees clockwise.  | 
|
Sets the rotation angle of the pattern, in degrees clockwise.  | 
Virtual Methods
In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of QgsFillSymbolLayer. See the FAQ for more details.
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.  | 
- class qgis.core.QgsFillSymbolLayer[source]¶
 Bases:
QgsSymbolLayer- angle(self) float[source]¶
 Returns the rotation angle of the fill symbol, in degrees clockwise.
Note
Not all fill symbol layers support rotation.
See also
- Return type:
 float
- abstract renderPolygon(self, points: QPolygonF, rings: Iterable[QPolygonF] | None, context: QgsSymbolRenderContext)[source]¶
 Renders the fill symbol layer for the polygon whose outer ring is defined by
points, using the given rendercontext.The
ringsargument optionally specifies a list of polygon rings to render as holes.- Parameters:
 points (QPolygonF)
rings (Optional[Iterable[QPolygonF]])
context (QgsSymbolRenderContext)
- setAngle(self, angle: float)[source]¶
 Sets the rotation
angleof the pattern, in degrees clockwise.Note
Not all fill symbol layers support rotation.
See also
- Parameters:
 angle (float)
- virtual toTiledPatternImage(self) QImage[source]¶
 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.
Added in version 3.30.