23using namespace Qt::StringLiterals;
27 return u
"simpleline"_s;
65 return *
this == *otherLine;
MaterialRenderingTechnique
Material rendering techniques.
@ Points
Point based rendering, requires point data.
@ Triangles
Triangle based rendering (default).
@ TrianglesFromModel
Triangle based rendering, using a model object source.
@ Lines
Line based rendering, requires line data.
@ Billboards
Flat billboard rendering.
@ TrianglesDataDefined
Triangle based rendering with possibility of datadefined color.
@ InstancedPoints
Instanced based rendering, requiring triangles and point data.
@ TrianglesWithFixedTexture
Triangle based rendering, using a fixed, non-user-configurable texture (e.g. for terrain rendering).
Abstract base class for material settings.
virtual void writeXml(QDomElement &element, const QgsReadWriteContext &) const
Writes settings to a DOM element.
virtual void readXml(const QDomElement &element, const QgsReadWriteContext &)
Reads settings from a DOM element.
static QColor colorFromString(const QString &string)
Decodes a string into a color value.
static QString colorToString(const QColor &color)
Encodes a color into a string value.
A container for the context for various read/write operations on objects.
static bool supportsTechnique(Qgis::MaterialRenderingTechnique technique)
Returns true if the specified technique is supported by the material.
QgsSimpleLineMaterialSettings * clone() const override
Clones the material settings.
void writeXml(QDomElement &elem, const QgsReadWriteContext &context) const override
Writes settings to a DOM element.
static QgsAbstractMaterialSettings * create()
Returns a new instance of QgsSimpleLineMaterialSettings.
void readXml(const QDomElement &elem, const QgsReadWriteContext &context) override
Reads settings from a DOM element.
QColor averageColor() const override
Returns an approximate color representing the blended material color.
void setAmbient(const QColor &ambient)
Sets the ambient color component.
QgsSimpleLineMaterialSettings()=default
void setColorsFromBase(const QColor &baseColor) override
Decomposes a base color into the material's color components, and sets the material's color according...
QColor ambient() const
Returns the ambient color component.
QString type() const override
Returns the unique type name for the material.
bool equals(const QgsAbstractMaterialSettings *other) const override
Returns true if this settings exactly matches an other settings.