Class: QgsInterpolatedLineSymbolLayer

class qgis.core.QgsInterpolatedLineSymbolLayer

Bases: QgsLineSymbolLayer

A symbol layer that represents vector layer line feature as interpolated line The interpolation is done between two values defined at the extremities

Added in version 3.20.

QgsInterpolatedLineSymbolLayer() Constructor

Methods

canCauseArtifactsBetweenAdjacentTiles

rtype:

bool

clone

rtype:

Optional[QgsInterpolatedLineSymbolLayer]

color

rtype:

QColor

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 the symbol layer

drawPreviewIcon

param context:

endValueExpressionForColor

Returns the expression related to the end extremity value for width for color

endValueExpressionForWidth

Returns the expression related to the end extremity value for width.

flags

rtype:

Qgis.SymbolLayerFlags

installMasks

When rendering, install masks on context painter if recursive is True masks are installed recursively for all children symbol layers

interpolatedColor

Returns the interpolated color used to render the colors of lines, see :py:class:`QgsInterpolatedLineColor`.

interpolatedWidth

Returns the interpolated width used to render the width of lines, see :py:class:`QgsInterpolatedLineWidth`.

layerType

rtype:

str

properties

rtype:

Dict[str, Any]

removeMasks

When rendering, remove previously installed masks from context painter if recursive is True masks are removed recursively for all children symbol layers

renderPolyline

param points:

restoreOldDataDefinedProperties

Restores older data defined properties from string map.

setExpressionsStringForColor

Sets the expressions (as string) that define the extremety values af the line feature for color.

setExpressionsStringForWidth

Sets the expressions (as string) that define the extremety values af the line feature for width.

setInterpolatedColor

Sets the interpolated color used to render the colors of lines, see QgsInterpolatedLineColor.

setInterpolatedWidth

Sets the interpolated width used to render the width of lines, see QgsInterpolatedLineWidth.

setWidthUnit

Sets the width unit.

shouldRenderUsingSelectionColor

Returns True if the symbol layer should be rendered using the selection color from the render context.

startFeatureRender

param feature:

startRender

param context:

startValueExpressionForColor

Returns the epression related to the start extremity value for width for color

startValueExpressionForWidth

Returns the epression related to the start extremity value for width.

stopFeatureRender

param feature:

stopRender

param context:

widthUnit

Returns the width unit.

canCauseArtifactsBetweenAdjacentTiles(self) bool
Return type:

bool

clone(self) QgsInterpolatedLineSymbolLayer | None
Return type:

Optional[QgsInterpolatedLineSymbolLayer]

color(self) QColor
Return type:

QColor

copyDataDefinedProperties(self, destLayer: QgsSymbolLayer | None)

Copies all data defined properties of this layer to another symbol layer.

Parameters:

destLayer – destination layer

copyPaintEffect(self, destLayer: QgsSymbolLayer | None)

Copies paint effect of this layer to another symbol layer

Parameters:

destLayer – destination layer

create(properties: Dict[str, Any]) QgsSymbolLayer | None

Creates the symbol layer

Parameters:

properties (Dict[str)

Return type:

Optional[QgsSymbolLayer]

drawPreviewIcon(self, context: QgsSymbolRenderContext, size: QSize)
Parameters:
endValueExpressionForColor(self) str

Returns the expression related to the end extremity value for width for color

Deprecated since version use: dataDefinedProperty( QgsSymbolLayer.PropertyLineEndColorValue ) instead.

Return type:

str

endValueExpressionForWidth(self) str

Returns the expression related to the end extremity value for width.

Deprecated since version use: dataDefinedProperty( QgsSymbolLayer.PropertyLineEndWidthValue ) instead.

Return type:

str

flags(self) Qgis.SymbolLayerFlags
Return type:

Qgis.SymbolLayerFlags

installMasks(self, context: QgsRenderContext, recursive: bool)

When rendering, install masks on context painter if recursive is True masks are installed recursively for all children symbol layers

See also

prepareMasks()

See also

removeMasks()

Added in version 3.30.

interpolatedColor(self) QgsInterpolatedLineColor

Returns the interpolated color used to render the colors of lines, see :py:class:`QgsInterpolatedLineColor`.

Return type:

QgsInterpolatedLineColor

interpolatedWidth(self) QgsInterpolatedLineWidth

Returns the interpolated width used to render the width of lines, see :py:class:`QgsInterpolatedLineWidth`.

Return type:

QgsInterpolatedLineWidth

layerType(self) str
Return type:

str

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 if recursive is True masks are removed recursively for all children symbol layers

See also

prepareMasks()

See also

installMasks()

Added in version 3.30.

renderPolyline(self, points: QPolygonF, context: QgsSymbolRenderContext)
Parameters:
restoreOldDataDefinedProperties(self, stringMap: Dict[str, Any])

Restores older data defined properties from string map.

setExpressionsStringForColor(self, start: str | None, end: str | None)

Sets the expressions (as string) that define the extremety values af the line feature for color.

Deprecated since version use: setDataDefinedProperty( QgsSymbolLayer.PropertyLineStartColorValue ) and setDataDefinedProperty( QgsSymbolLayer.PropertyLineEndColorValue ) instead

Parameters:
  • start (Optional[str])

  • end (Optional[str])

setExpressionsStringForWidth(self, start: str | None, end: str | None)

Sets the expressions (as string) that define the extremety values af the line feature for width.

Deprecated since version use: setDataDefinedProperty( QgsSymbolLayer.PropertyLineStartWidthValue ) and setDataDefinedProperty( QgsSymbolLayer.PropertyLineEndWidthValue ) instead

Parameters:
  • start (Optional[str])

  • end (Optional[str])

setInterpolatedColor(self, interpolatedLineColor: QgsInterpolatedLineColor)

Sets the interpolated color used to render the colors of lines, see QgsInterpolatedLineColor.

Parameters:

interpolatedLineColor (QgsInterpolatedLineColor)

setInterpolatedWidth(self, interpolatedLineWidth: QgsInterpolatedLineWidth)

Sets the interpolated width used to render the width of lines, see QgsInterpolatedLineWidth.

Parameters:

interpolatedLineWidth (QgsInterpolatedLineWidth)

setWidthUnit(self, strokeWidthUnit: Qgis.RenderUnit)

Sets the width unit.

See also

widthUnit()

Parameters:

strokeWidthUnit (Qgis.RenderUnit)

shouldRenderUsingSelectionColor(self, context: QgsSymbolRenderContext) bool

Returns True if the symbol layer should be rendered using the selection color from the render context.

Added in version 3.34.

startFeatureRender(self, feature: QgsFeature, context: QgsRenderContext)
Parameters:
startRender(self, context: QgsSymbolRenderContext)
Parameters:

context (QgsSymbolRenderContext)

startValueExpressionForColor(self) str

Returns the epression related to the start extremity value for width for color

Deprecated since version use: dataDefinedProperty( QgsSymbolLayer.PropertyLineStartColorValue ) instead.

Return type:

str

startValueExpressionForWidth(self) str

Returns the epression related to the start extremity value for width.

Deprecated since version use: dataDefinedProperty( QgsSymbolLayer.PropertyLineStartWidthValue ) instead.

Return type:

str

stopFeatureRender(self, feature: QgsFeature, context: QgsRenderContext)
Parameters:
stopRender(self, context: QgsSymbolRenderContext)
Parameters:

context (QgsSymbolRenderContext)

widthUnit(self) Qgis.RenderUnit

Returns the width unit.

See also

setWidthUnit()

Return type:

Qgis.RenderUnit