Class: QgsLineburstSymbolLayer

class qgis.core.QgsLineburstSymbolLayer

Bases: QgsAbstractBrushedLineSymbolLayer

Line symbol layer type which draws a gradient pattern perpendicularly along a line.

See QgsInterpolatedLineSymbolLayer for a line symbol layer which draws gradients along the length of a line.

New in version 3.24.

QgsLineburstSymbolLayer(color: Union[QColor, Qt.GlobalColor, QGradient] = DEFAULT_SIMPLELINE_COLOR, color2: Union[QColor, Qt.GlobalColor, QGradient] = Qt.white) Constructor for QgsLineburstSymbolLayer, with the specified start and end gradient colors.

Methods

clone

rtype

QgsLineburstSymbolLayer

color2

Returns the color for endpoint of gradient, only used if the gradient color type is set to SimpleTwoColor.

colorRamp

Returns the color ramp used for the gradient line.

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 QgsLineburstSymbolLayer, using the settings serialized in the properties map (corresponding to the output from QgsLineburstSymbolLayer.properties() ).

estimateMaxBleed

param context

gradientColorType

Returns the gradient color mode, which controls how gradient color stops are created.

layerType

rtype

str

mapUnitScale

rtype

QgsMapUnitScale

outputUnit

rtype

QgsUnitTypes.RenderUnit

properties

rtype

Dict[str, Any]

renderPolyline

param points

renderPolylineUsingBrush

Renders a polyline of points using the specified brush.

restoreOldDataDefinedProperties

Restores older data defined properties from string map.

setColor2

Sets the color for endpoint of gradient, only used if the gradient color type is set to SimpleTwoColor.

setColorRamp

Sets the color ramp used for the gradient line.

setGradientColorType

Sets the gradient color mode, which controls how gradient color stops are created.

setMapUnitScale

param scale

setOutputUnit

param unit

startRender

param context

stopRender

param context

usesMapUnits

rtype

bool

clone(self) QgsLineburstSymbolLayer
Return type

QgsLineburstSymbolLayer

color2(self) QColor

Returns the color for endpoint of gradient, only used if the gradient color type is set to SimpleTwoColor.

See also

setColor2()

Return type

QColor

colorRamp(self) QgsColorRamp

Returns the color ramp used for the gradient line. This is only used if the gradient color type is set to ColorRamp.

See also

setColorRamp()

Return type

QgsColorRamp

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.

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

Creates a new QgsLineburstSymbolLayer, using the settings serialized in the properties map (corresponding to the output from QgsLineburstSymbolLayer.properties() ).

Parameters

properties (Dict[str) –

Return type

QgsSymbolLayer

estimateMaxBleed(self, context: QgsRenderContext) float
Parameters

context (QgsRenderContext) –

Return type

float

gradientColorType(self) Qgis.GradientColorSource

Returns the gradient color mode, which controls how gradient color stops are created.

Return type

Qgis.GradientColorSource

layerType(self) str
Return type

str

mapUnitScale(self) QgsMapUnitScale
Return type

QgsMapUnitScale

outputUnit(self) QgsUnitTypes.RenderUnit
Return type

QgsUnitTypes.RenderUnit

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

Dict[str, Any]

renderPolyline(self, points: QPolygonF, context: QgsSymbolRenderContext)
Parameters
renderPolylineUsingBrush(self, points: QPolygonF, context: QgsSymbolRenderContext, brush: Union[QBrush, QColor, Qt.GlobalColor, QGradient], patternThickness: float, patternLength: float)

Renders a polyline of points using the specified brush.

restoreOldDataDefinedProperties(self, stringMap: Dict[str, Any])

Restores older data defined properties from string map.

New in version 3.0.

setColor2(self, color2: Union[QColor, Qt.GlobalColor, QGradient])

Sets the color for endpoint of gradient, only used if the gradient color type is set to SimpleTwoColor.

See also

color2()

Parameters

color2 (Union[QColor) –

setColorRamp(self, ramp: QgsColorRamp)

Sets the color ramp used for the gradient line. This is only used if the gradient color type is set to ColorRamp.

Parameters

ramp (QgsColorRamp) – color ramp. Ownership is transferred.

See also

colorRamp()

setGradientColorType(self, gradientColorType: Qgis.GradientColorSource)

Sets the gradient color mode, which controls how gradient color stops are created.

Parameters

gradientColorType (Qgis.GradientColorSource) –

setMapUnitScale(self, scale: QgsMapUnitScale)
Parameters

scale (QgsMapUnitScale) –

setOutputUnit(self, unit: QgsUnitTypes.RenderUnit)
Parameters

unit (QgsUnitTypes.RenderUnit) –

startRender(self, context: QgsSymbolRenderContext)
Parameters

context (QgsSymbolRenderContext) –

stopRender(self, context: QgsSymbolRenderContext)
Parameters

context (QgsSymbolRenderContext) –

usesMapUnits(self) bool
Return type

bool