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.

List of all members, including inherited members

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.

Constructor

__init__

Methods

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.

gradientColorType

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

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.

Virtual Methods

In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of QgsLineburstSymbolLayer. See the FAQ for more details.

clone

Static Methods

create

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

class qgis.core.QgsLineburstSymbolLayer[source]

Bases: QgsAbstractBrushedLineSymbolLayer

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

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

Parameters:
  • color (QColor|Qt.GlobalColor|int = DEFAULT_SIMPLELINE_COLOR)

  • color2 (QColor|Qt.GlobalColor|int = Qt.white)

virtual clone(self) → QgsLineburstSymbolLayer | None[source]
Return type:

QgsLineburstSymbolLayer|None

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:

QgsColorRamp|None

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

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

Parameters:

properties (dict[str|None, Any] = {})

Return type:

QgsSymbolLayer|None

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 | int)[source]

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

See also

color2()

Parameters:

color2 (QColor|Qt.GlobalColor|int)

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 (QgsColorRamp|None) – 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)