ArcGIS Developers
Dashboard

LineSymbol Class

class Esri::ArcGISRuntime::LineSymbol

Base class for line symbols. More...

Header: #include <LineSymbol>
Since: Esri::ArcGISRuntime 100.0
Inherits: Esri::ArcGISRuntime::Symbol
Inherited By:

Esri::ArcGISRuntime::SimpleLineSymbol

This class was introduced in Esri::ArcGISRuntime 100.0.

Public Functions

virtual ~LineSymbol() override
QColor color() const
bool isAntiAlias() const
void setAntiAlias(bool antiAlias)
void setColor(const QColor &color)
void setWidth(float width)
float width() const

Protected Functions

LineSymbol(QObject *parent = nullptr)

Detailed Description

Symbols describe how graphics and features look on a map. Different symbols are used with different geometry types. Line symbols are used to display graphics and features that are based on polyline geometries. Subclasses of this class represent specific types of line symbols.

Member Function Documentation

[protected] LineSymbol::LineSymbol(QObject *parent = nullptr)

Default constructor with an optional parent.

[override virtual] LineSymbol::~LineSymbol()

Destructor.

QColor LineSymbol::color() const

Returns the color of the line.

When getting the color (or tint color) from a symbol, the consensus value (for all layers) is reported. If there is no consensus (one or more layers have different colors), a null value is reported for the color. Likewise, setting a value for color on a symbol will apply that color to all layers the symbol contains.

If you don't want changes to the symbol color to propagate to some of the symbol layers it contains, you can lock the color (or tint color) for those layers. If a symbol layer is color-locked, changes to the parent symbol will not affect the symbol layer. This also means that the layer will not be considered when determining a consensus color for the symbol as a whole.

See also setColor().

bool LineSymbol::isAntiAlias() const

Returns whether the line should be anti-aliased.

Defaults to true.

void LineSymbol::setAntiAlias(bool antiAlias)

Sets whether the line should render as antiAlias to smooth edges.

Defaults to true.

See also isAntiAlias().

void LineSymbol::setColor(const QColor &color)

Sets the color of the line.

When getting the color (or tint color) from a symbol, the consensus value (for all layers) is reported. If there is no consensus (one or more layers have different colors), a null value is reported for the color. Likewise, setting a value for color on a symbol will apply that color to all layers the symbol contains.

If you don't want changes to the symbol color to propagate to some of the symbol layers it contains, you can lock the color (or tint color) for those layers. If a symbol layer is color-locked, changes to the parent symbol will not affect the symbol layer. This also means that the layer will not be considered when determining a consensus color for the symbol as a whole.

See also color().

void LineSymbol::setWidth(float width)

Sets the width of the line, in device independent pixels (DIPs).

See also width().

float LineSymbol::width() const

Returns the width of the line, in device independent pixels (DIPs).

See also setWidth().


Feedback on this topic?