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

New in version 3.20.

QgsInterpolatedLineSymbolLayer() Constructor

Methods

canCauseArtifactsBetweenAdjacentTiles

rtype

bool

clone

rtype

QgsInterpolatedLineSymbolLayer

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

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`

isCompatibleWithSymbol

param symbol

layerType

rtype

str

properties

rtype

Dict[str, Any]

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

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

usedAttributes

param context

widthUnit

Returns the width unit

canCauseArtifactsBetweenAdjacentTiles(self)bool
Return type

bool

clone(self)QgsInterpolatedLineSymbolLayer
Return type

QgsInterpolatedLineSymbolLayer

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

Parameters

properties (Dict[str) –

Return type

QgsSymbolLayer

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

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

Return type

str

endValueExpressionForWidth(self)str

Returns the expression related to the end extremity value for width

Return type

str

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

isCompatibleWithSymbol(self, symbol: QgsSymbol)bool
Parameters

symbol (QgsSymbol) –

Return type

bool

layerType(self)str
Return type

str

properties(self)Dict[str, Any]
Return type

Dict[str, Any]

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

Restores older data defined properties from string map.

New in version 3.0.

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

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

Parameters
  • start (str) –

  • end (str) –

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

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

Parameters
  • start (str) –

  • end (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: QgsUnitTypes.RenderUnit)

Sets the width unit

Parameters

strokeWidthUnit (QgsUnitTypes.RenderUnit) –

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

Return type

str

startValueExpressionForWidth(self)str

Returns the epression related to the start extremity value for width

Return type

str

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

context (QgsSymbolRenderContext) –

usedAttributes(self, context: QgsRenderContext)Set[str]
Parameters

context (QgsRenderContext) –

Return type

Set[str]

widthUnit(self)QgsUnitTypes.RenderUnit

Returns the width unit

Return type

QgsUnitTypes.RenderUnit