Class: QgsRasterLineSymbolLayer

Line symbol layer type which draws line sections using a raster image file.

Added in version 3.24.

Class Hierarchy

Inheritance diagram of qgis.core.QgsRasterLineSymbolLayer

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.

Methods

opacity

Returns the line opacity.

path

Returns the raster image path.

setOpacity

Set the line opacity.

setPath

Set the raster image path.

Static Methods

create

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

resolvePaths

Turns relative paths in properties map to absolute when reading and vice versa when writing.

class qgis.core.QgsRasterLineSymbolLayer[source]

Bases: QgsAbstractBrushedLineSymbolLayer

__init__(path: str | None = '')

Constructor for QgsRasterLineSymbolLayer, with the specified raster image path.

Parameters:

path (Optional[str] = '')

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

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

Parameters:

properties (Dict[str, Any] = {})

Return type:

Optional[QgsSymbolLayer]

opacity(self) float[source]

Returns the line opacity.

Return type:

float

Returns:

opacity value between 0 (fully transparent) and 1 (fully opaque)

See also

setOpacity()

path(self) str[source]

Returns the raster image path.

See also

setPath()

Return type:

str

static resolvePaths(properties: Dict[str, Any], pathResolver: QgsPathResolver, saving: bool)[source]

Turns relative paths in properties map to absolute when reading and vice versa when writing. Used internally when reading/writing symbols.

Parameters:
setOpacity(self, opacity: float)[source]

Set the line opacity.

Parameters:

opacity (float) – opacity value between 0 (fully transparent) and 1 (fully opaque)

See also

opacity()

setPath(self, path: str | None)[source]

Set the raster image path.

See also

path()

Parameters:

path (Optional[str])