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.
- rtype:
str
- rtype:
QgsMapUnitScale
- rtype:
QgsUnitTypes.RenderUnit
- rtype:
Dict[str, Any]
- 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:
- 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
New in version 2.9.
- 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:
- layerType(self) str ¶
- Return type:
str
- mapUnitScale(self) QgsMapUnitScale ¶
- Return type:
- outputUnit(self) QgsUnitTypes.RenderUnit ¶
- Return type:
- properties(self) Dict[str, Any] ¶
- Return type:
Dict[str, Any]
- 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.
New in version 3.0.
- 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: 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