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¶
Base classes¶
Abstract base class for material settings. |
Abstract Methods
Returns an approximate color representing the blended material color. |
|
Decomposes a base color into the material's color components, and sets the material's color accordingly. |
Methods
Returns the ambient color component. |
|
Sets the ambient color component. |
Static Methods
Returns a new instance of QgsSimpleLineMaterialSettings. |
|
Returns |
- class qgis.core.QgsSimpleLineMaterialSettings[source]¶
Bases:
QgsAbstractMaterialSettings- 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
Added in version 4.2.
- Return type:
QColor
- static create() QgsAbstractMaterialSettings | None[source]¶
Returns a new instance of QgsSimpleLineMaterialSettings.
- Return type:
- setAmbient(self, ambient: QColor | Qt.GlobalColor | int)[source]¶
Sets the
ambientcolor component.See also
- 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
Added in version 4.2.
- static supportsTechnique(technique: Qgis.MaterialRenderingTechnique) bool[source]¶
Returns
Trueif the specifiedtechniqueis supported by the material.- Parameters:
technique (Qgis.MaterialRenderingTechnique)
- Return type:
bool