Class: QgsLineburstSymbolLayer

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.

Added in version 3.24.

Class Hierarchy

Inheritance diagram of qgis.core.QgsLineburstSymbolLayer

Base classes

QgsAbstractBrushedLineSymbolLayer

Base class for line symbol layer types which draws line sections using a QBrush.

QgsLineSymbolLayer

Abstract base class for line symbol layers.

QgsSymbolLayer

Abstract base class for symbol layers.

class qgis.core.QgsLineburstSymbolLayer[source]

Bases: QgsAbstractBrushedLineSymbolLayer

__init__(color: QColor | Qt.GlobalColor = DEFAULT_SIMPLELINE_COLOR, color2: QColor | Qt.GlobalColor = Qt.white)

Constructor for QgsLineburstSymbolLayer, with the specified start and end gradient colors.

Parameters:
  • color (Union[QColor, Qt.GlobalColor] = DEFAULT_SIMPLELINE_COLOR)

  • color2 (Union[QColor, Qt.GlobalColor] = Qt.white)

color2(self) QColor[source]

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 | None[source]

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:

Optional[QgsColorRamp]

static create(properties: Dict[str, Any] = {}) QgsSymbolLayer | None[source]

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

Parameters:

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

Return type:

Optional[QgsSymbolLayer]

gradientColorType(self) Qgis.GradientColorSource[source]

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

Return type:

Qgis.GradientColorSource

setColor2(self, color2: QColor | Qt.GlobalColor)[source]

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, Qt.GlobalColor])

setColorRamp(self, ramp: QgsColorRamp | None)[source]

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

Parameters:

ramp (Optional[QgsColorRamp]) – color ramp. Ownership is transferred.

See also

colorRamp()

setGradientColorType(self, gradientColorType: Qgis.GradientColorSource)[source]

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

Parameters:

gradientColorType (Qgis.GradientColorSource)