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
- rtype:
QgsLineburstSymbolLayer
Returns the color for endpoint of gradient, only used if the gradient color type is set to SimpleTwoColor.
Returns the color ramp used for the gradient line.
Copies all data defined properties of this layer to another symbol layer.
Copies paint effect of this layer to another symbol layer
Creates a new
QgsLineburstSymbolLayer
, using the settings serialized in theproperties
map (corresponding to the output fromQgsLineburstSymbolLayer.properties()
).- param context:
Returns the gradient color mode, which controls how gradient color stops are created.
When rendering, install masks on
context
painter ifrecursive
isTrue
masks are installed recursively for all children symbol layers- rtype:
str
- rtype:
QgsMapUnitScale
- rtype:
Qgis.RenderUnit
- rtype:
Dict[str, Any]
When rendering, remove previously installed masks from
context
painter ifrecursive
isTrue
masks are removed recursively for all children symbol layers- param points:
Renders a polyline of
points
using the specifiedbrush
.Restores older data defined properties from string map.
Sets the color for endpoint of gradient, only used if the gradient color type is set to SimpleTwoColor.
Sets the color ramp used for the gradient line.
Sets the gradient color mode, which controls how gradient color stops are created.
- param scale:
- param unit:
Returns
True
if the symbol layer should be rendered using the selection color from the render context.- param context:
- param context:
- rtype:
bool
- clone(self) QgsLineburstSymbolLayer ¶
- Return type:
- color2(self) QColor ¶
Returns the color for endpoint of gradient, only used if the gradient color type is set to SimpleTwoColor.
See also
- 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
See also
- Return type:
- 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
QgsLineburstSymbolLayer
, using the settings serialized in theproperties
map (corresponding to the output fromQgsLineburstSymbolLayer.properties()
).- Parameters:
properties (Dict[str) –
- Return type:
- 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.
See also
- Return type:
- installMasks(self, context: QgsRenderContext, recursive: bool)¶
When rendering, install masks on
context
painter ifrecursive
isTrue
masks are installed recursively for all children symbol layersSee also
prepareMasks()
See also
New in version 3.30.
- layerType(self) str ¶
- Return type:
str
- mapUnitScale(self) QgsMapUnitScale ¶
- Return type:
- outputUnit(self) Qgis.RenderUnit ¶
- Return type:
- 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 ifrecursive
isTrue
masks are removed recursively for all children symbol layersSee also
prepareMasks()
See also
New in version 3.30.
- renderPolyline(self, points: QPolygonF, context: QgsSymbolRenderContext)¶
- Parameters:
points (QPolygonF) –
context (QgsSymbolRenderContext) –
- renderPolylineUsingBrush(self, points: QPolygonF, context: QgsSymbolRenderContext, brush: QBrush | QColor | Qt.GlobalColor | QGradient, patternThickness: float, patternLength: float)¶
Renders a polyline of
points
using the specifiedbrush
.
- restoreOldDataDefinedProperties(self, stringMap: Dict[str, Any])¶
Restores older data defined properties from string map.
- setColor2(self, color2: QColor | Qt.GlobalColor | QGradient)¶
Sets the color for endpoint of gradient, only used if the gradient color type is set to SimpleTwoColor.
See also
- 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
See also
- setGradientColorType(self, gradientColorType: Qgis.GradientColorSource)¶
Sets the gradient color mode, which controls how gradient color stops are created.
See also
- Parameters:
gradientColorType (Qgis.GradientColorSource) –
- setMapUnitScale(self, scale: QgsMapUnitScale)¶
- Parameters:
scale (QgsMapUnitScale) –
- setOutputUnit(self, unit: Qgis.RenderUnit)¶
- Parameters:
unit (Qgis.RenderUnit) –
- 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) –
- usesMapUnits(self) bool ¶
- Return type:
bool