Class: QgsSimpleFillSymbolLayer

class qgis.core.QgsSimpleFillSymbolLayer(color: QColor | Qt.GlobalColor | QGradient = DEFAULT_SIMPLEFILL_COLOR, style: Qt.BrushStyle = DEFAULT_SIMPLEFILL_STYLE, strokeColor: QColor | Qt.GlobalColor | QGradient = DEFAULT_SIMPLEFILL_BORDERCOLOR, strokeStyle: Qt.PenStyle = DEFAULT_SIMPLEFILL_BORDERSTYLE, strokeWidth: float = DEFAULT_SIMPLEFILL_BORDERWIDTH, penJoinStyle: Qt.PenJoinStyle = DEFAULT_SIMPLEFILL_JOINSTYLE)

Bases: QgsFillSymbolLayer

Methods

brushStyle

rtype:

Qt.BrushStyle

clone

rtype:

QgsSimpleFillSymbolLayer

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

Creates a new QgsSimpleFillSymbolLayer using the specified properties map containing symbol properties (see properties()).

createFromSld

param element:

dxfAngle

param context:

dxfBrushColor

param context:

dxfBrushStyle

rtype:

Qt.BrushStyle

dxfColor

param context:

dxfPenStyle

rtype:

Qt.PenStyle

dxfWidth

param e:

estimateMaxBleed

param context:

fillColor

rtype:

QColor

installMasks

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

layerType

rtype:

str

mapUnitScale

rtype:

QgsMapUnitScale

offset

Returns the offset by which polygons will be translated during rendering.

offsetMapUnitScale

Returns the map unit scale for the fill's offset.

offsetUnit

Returns the units for the fill's offset.

ogrFeatureStyle

param mmScaleFactor:

outputUnit

rtype:

Qgis.RenderUnit

penJoinStyle

rtype:

Qt.PenJoinStyle

properties

rtype:

Dict[str, Any]

removeMasks

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

renderPolygon

param points:

restoreOldDataDefinedProperties

Restores older data defined properties from string map.

setBrushStyle

param style:

setFillColor

param color:

setMapUnitScale

param scale:

setOffset

Sets an offset by which polygons will be translated during rendering.

setOffsetMapUnitScale

Sets the map unit scale for the fill's offset.

setOffsetUnit

Sets the unit for the fill's offset.

setOutputUnit

param unit:

setPenJoinStyle

param style:

setStrokeColor

param strokeColor:

setStrokeStyle

param strokeStyle:

setStrokeWidth

param strokeWidth:

setStrokeWidthMapUnitScale

param scale:

setStrokeWidthUnit

Sets the units for the width of the fill's stroke.

shouldRenderUsingSelectionColor

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

startRender

param context:

stopRender

param context:

strokeColor

rtype:

QColor

strokeStyle

rtype:

Qt.PenStyle

strokeWidth

rtype:

float

strokeWidthMapUnitScale

rtype:

QgsMapUnitScale

strokeWidthUnit

Returns the units for the width of the fill's stroke.

toSld

param doc:

toTiledPatternImage

rtype:

QImage

usesMapUnits

rtype:

bool

brushStyle(self) Qt.BrushStyle
Return type:

Qt.BrushStyle

clone(self) QgsSimpleFillSymbolLayer
Return type:

QgsSimpleFillSymbolLayer

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

create(properties: Dict[str, Any] = {}) QgsSymbolLayer

Creates a new QgsSimpleFillSymbolLayer using the specified properties map containing symbol properties (see properties()).

Caller takes ownership of the returned symbol layer.

Parameters:

properties (Dict[str) –

Return type:

QgsSymbolLayer

createFromSld(element: QDomElement) QgsSymbolLayer
Parameters:

element (QDomElement) –

Return type:

QgsSymbolLayer

dxfAngle(self, context: QgsSymbolRenderContext) float
Parameters:

context (QgsSymbolRenderContext) –

Return type:

float

dxfBrushColor(self, context: QgsSymbolRenderContext) QColor
Parameters:

context (QgsSymbolRenderContext) –

Return type:

QColor

dxfBrushStyle(self) Qt.BrushStyle
Return type:

Qt.BrushStyle

dxfColor(self, context: QgsSymbolRenderContext) QColor
Parameters:

context (QgsSymbolRenderContext) –

Return type:

QColor

dxfPenStyle(self) Qt.PenStyle
Return type:

Qt.PenStyle

dxfWidth(self, e: QgsDxfExport, context: QgsSymbolRenderContext) float
Parameters:
Return type:

float

estimateMaxBleed(self, context: QgsRenderContext) float
Parameters:

context (QgsRenderContext) –

Return type:

float

fillColor(self) QColor
Return type:

QColor

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.

layerType(self) str
Return type:

str

mapUnitScale(self) QgsMapUnitScale
Return type:

QgsMapUnitScale

offset(self) QPointF

Returns the offset by which polygons will be translated during rendering.

Units are specified by offsetUnit().

See also

setOffset()

See also

offsetUnit()

Return type:

QPointF

offsetMapUnitScale(self) QgsMapUnitScale

Returns the map unit scale for the fill’s offset.

See also

offset()

Return type:

QgsMapUnitScale

offsetUnit(self) Qgis.RenderUnit

Returns the units for the fill’s offset.

See also

setOffsetUnit()

See also

offset()

Return type:

Qgis.RenderUnit

ogrFeatureStyle(self, mmScaleFactor: float, mapUnitScaleFactor: float) str
Parameters:
  • mmScaleFactor (float) –

  • mapUnitScaleFactor (float) –

Return type:

str

outputUnit(self) Qgis.RenderUnit
Return type:

Qgis.RenderUnit

penJoinStyle(self) Qt.PenJoinStyle
Return type:

Qt.PenJoinStyle

properties(self) Dict[str, Any]
Return type:

Dict[str, Any]

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)
Parameters:
restoreOldDataDefinedProperties(self, stringMap: Dict[str, Any])

Restores older data defined properties from string map.

setBrushStyle(self, style: Qt.BrushStyle)
Parameters:

style (Qt.BrushStyle) –

setFillColor(self, color: QColor | Qt.GlobalColor | QGradient)
Parameters:

color (Union[QColor) –

setMapUnitScale(self, scale: QgsMapUnitScale)
Parameters:

scale (QgsMapUnitScale) –

setOffset(self, offset: QPointF | QPoint)

Sets an offset by which polygons will be translated during rendering.

Units are specified by offsetUnit().

See also

offset()

See also

setOffsetUnit()

Parameters:

offset (Union[QPointF) –

setOffsetMapUnitScale(self, scale: QgsMapUnitScale)

Sets the map unit scale for the fill’s offset.

See also

setOffset()

Parameters:

scale (QgsMapUnitScale) –

setOffsetUnit(self, unit: Qgis.RenderUnit)

Sets the unit for the fill’s offset.

See also

offset()

See also

offsetUnit()

Parameters:

unit (Qgis.RenderUnit) –

setOutputUnit(self, unit: Qgis.RenderUnit)
Parameters:

unit (Qgis.RenderUnit) –

setPenJoinStyle(self, style: Qt.PenJoinStyle)
Parameters:

style (Qt.PenJoinStyle) –

setStrokeColor(self, strokeColor: QColor | Qt.GlobalColor | QGradient)
Parameters:

strokeColor (Union[QColor) –

setStrokeStyle(self, strokeStyle: Qt.PenStyle)
Parameters:

strokeStyle (Qt.PenStyle) –

setStrokeWidth(self, strokeWidth: float)
Parameters:

strokeWidth (float) –

setStrokeWidthMapUnitScale(self, scale: QgsMapUnitScale)
Parameters:

scale (QgsMapUnitScale) –

setStrokeWidthUnit(self, unit: Qgis.RenderUnit)

Sets the units for the width of the fill’s stroke.

Parameters:

unit (Qgis.RenderUnit) – width units

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.

startRender(self, context: QgsSymbolRenderContext)
Parameters:

context (QgsSymbolRenderContext) –

stopRender(self, context: QgsSymbolRenderContext)
Parameters:

context (QgsSymbolRenderContext) –

strokeColor(self) QColor
Return type:

QColor

strokeStyle(self) Qt.PenStyle
Return type:

Qt.PenStyle

strokeWidth(self) float
Return type:

float

strokeWidthMapUnitScale(self) QgsMapUnitScale
Return type:

QgsMapUnitScale

strokeWidthUnit(self) Qgis.RenderUnit

Returns the units for the width of the fill’s stroke.

Return type:

Qgis.RenderUnit

toSld(self, doc: QDomDocument, element: QDomElement, props: Dict[str, Any])
Parameters:
  • doc (QDomDocument) –

  • element (QDomElement) –

  • props (Dict[str) –

toTiledPatternImage(self) QImage
Return type:

QImage

usesMapUnits(self) bool
Return type:

bool