Class: QgsFillSymbol

class qgis.core.QgsFillSymbol(layers: Iterable[QgsSymbolLayer] = [])

Bases: QgsSymbol

Constructor for QgsFillSymbol, with the specified list of initial symbol layers.

Ownership of the layers are transferred to the symbol.

A fill symbol type, for rendering Polygon and MultiPolygon geometries.



clone(self) → QgsFillSymbol
Return type


createSimple(properties: Dict[str, str]) → QgsFillSymbol

Create a fill symbol with one symbol layer: SimpleFill with specified properties. This is a convenience method for easier creation of fill symbols.


properties (Dict[str) –

Return type


renderPolygon(self, points: QPolygonF, rings: Iterable[QPolygonF], f: QgsFeature, context: QgsRenderContext, layer: int = -1, selected: bool = False)

Renders the symbol using the given render context.

The points list dictates the exterior ring for the polygon to render, and interior rings are optionally specified via the rings argument.

The f argument is used to pass the feature currently being rendered (when available).

If only a single symbol layer from the symbol should be rendered, it should be specified in the layer argument. A layer of -1 indicates that all symbol layers should be rendered.

If selected is true then the symbol will be drawn using the “selected feature” style and colors instead of the symbol’s normal style.

  • points (QPolygonF) –

  • rings (Iterable[QPolygonF]) –

  • f (QgsFeature) –

  • context (QgsRenderContext) –

  • layer (int = -1) –

  • selected (bool = False) –

setAngle(self, angle: float)

angle (float) –