Class: QgsSymbolBufferSettings

Contains settings relating to symbol buffers, which draw a “halo” effect around the symbol.

Added in version 3.40.

Methods

enabled

Returns whether the buffer is enabled.

fillSymbol

Returns the fill symbol used to render the buffer.

joinStyle

Returns the buffer join style.

readXml

Reads the buffer settings from an XML element.

setEnabled

Sets whether the symbol buffer will be drawn.

setFillSymbol

Sets the fill symbol used to render the buffer.

setJoinStyle

Sets the join style used for drawing the buffer.

setSize

Sets the size of the buffer.

setSizeMapUnitScale

Sets the map unit scale object for the buffer size.

setSizeUnit

Sets the unit used for the buffer size.

size

Returns the size of the buffer.

sizeMapUnitScale

Returns the map unit scale object for the buffer size.

sizeUnit

Returns the units for the buffer size.

writeXml

Writes the buffer settings to an XML element.

class qgis.core.QgsSymbolBufferSettings[source]

Bases: object

enabled(self) bool[source]

Returns whether the buffer is enabled.

See also

setEnabled()

Return type:

bool

fillSymbol(self) QgsFillSymbol | None[source]

Returns the fill symbol used to render the buffer.

Ownership is not transferred.

See also

setFillSymbol()

Return type:

Optional[QgsFillSymbol]

joinStyle(self) Qt.PenJoinStyle[source]

Returns the buffer join style.

See also

setJoinStyle()

Return type:

Qt.PenJoinStyle

readXml(self, element: QDomElement, context: QgsReadWriteContext)[source]

Reads the buffer settings from an XML element.

See also

readXml()

Parameters:
setEnabled(self, enabled: bool)[source]

Sets whether the symbol buffer will be drawn.

See also

enabled()

Parameters:

enabled (bool)

setFillSymbol(self, symbol: QgsFillSymbol | None)[source]

Sets the fill symbol used to render the buffer. Ownership of symbol is transferred to the buffer.

See also

fillSymbol()

Parameters:

symbol (Optional[QgsFillSymbol])

setJoinStyle(self, style: Qt.PenJoinStyle)[source]

Sets the join style used for drawing the buffer.

See also

joinStyle()

Parameters:

style (Qt.PenJoinStyle)

setSize(self, size: float)[source]

Sets the size of the buffer.

The size units are specified using setSizeUnit().

See also

size()

See also

setSizeUnit()

Parameters:

size (float)

setSizeMapUnitScale(self, scale: QgsMapUnitScale)[source]

Sets the map unit scale object for the buffer size.

This is only used if the buffer size is set to QgsUnitTypes.RenderMapUnit.

See also

setSizeUnit()

Parameters:

scale (QgsMapUnitScale)

setSizeUnit(self, unit: Qgis.RenderUnit)[source]

Sets the unit used for the buffer size.

See also

setSize()

See also

sizeUnit()

Parameters:

unit (Qgis.RenderUnit)

size(self) float[source]

Returns the size of the buffer.

See also

sizeUnit()

See also

setSize()

Return type:

float

sizeMapUnitScale(self) QgsMapUnitScale[source]

Returns the map unit scale object for the buffer size. This is only used if the buffer size is set to QgsUnitTypes.RenderMapUnit.

See also

sizeUnit()

Return type:

QgsMapUnitScale

sizeUnit(self) Qgis.RenderUnit[source]

Returns the units for the buffer size.

See also

size()

See also

setSizeUnit()

Return type:

Qgis.RenderUnit

writeXml(self, element: QDomElement, context: QgsReadWriteContext)[source]

Writes the buffer settings to an XML element.

See also

readXml()

Parameters: