Class: QgsSimpleLineMaterialSettings

Basic shading material used for rendering simple lines as solid line components.

Warning

This is not considered stable API, and may change in future QGIS releases. It is exposed to the Python bindings as a tech preview only.

Added in version 3.16.

List of all members, including inherited members

Class Hierarchy

Inheritance diagram of qgis.core.QgsSimpleLineMaterialSettings

Base classes

QgsAbstractMaterialSettings

Abstract base class for material settings.

Abstract Methods

averageColor

Returns an approximate color representing the blended material color.

setColorsFromBase

Decomposes a base color into the material's color components, and sets the material's color accordingly.

Methods

ambient

Returns the ambient color component.

setAmbient

Sets the ambient color component.

Static Methods

create

Returns a new instance of QgsSimpleLineMaterialSettings.

supportsTechnique

Returns True if the specified technique is supported by the material.

class qgis.core.QgsSimpleLineMaterialSettings[source]

Bases: QgsAbstractMaterialSettings

ambient(self) QColor[source]

Returns the ambient color component.

See also

setAmbient()

Return type:

QColor

abstract averageColor(self) QColor[source]

Returns an approximate color representing the blended material color.

Since this material contains only a single color, this function simply returns ambient().

See also

ambient()

Added in version 4.2.

Return type:

QColor

static create() QgsAbstractMaterialSettings | None[source]

Returns a new instance of QgsSimpleLineMaterialSettings.

Return type:

Optional[QgsAbstractMaterialSettings]

setAmbient(self, ambient: QColor | Qt.GlobalColor | int)[source]

Sets the ambient color component.

See also

ambient()

Parameters:

ambient (Union[QColor, Qt.GlobalColor, int])

abstract setColorsFromBase(self, baseColor: QColor | Qt.GlobalColor | int)[source]

Decomposes a base color into the material’s color components, and sets the material’s color accordingly.

Since this material contains only a single color, this function is equivalent to calling setAmbient(baseColor).

Parameters:

baseColor (Union[QColor, Qt.GlobalColor, int]) – The color to decompose

See also

setAmbient()

Added in version 4.2.

static supportsTechnique(technique: Qgis.MaterialRenderingTechnique) bool[source]

Returns True if the specified technique is supported by the material.

Parameters:

technique (Qgis.MaterialRenderingTechnique)

Return type:

bool