Skip To Content ArcGIS for Developers Sign In Dashboard

SimpleLineSymbol Class

(Esri::ArcGISRuntime::SimpleLineSymbol)

A line symbol based on simple patterns. More...

Header: #include <SimpleLineSymbol>
Since: Esri::ArcGISRuntime 100.0
Inherits: LineSymbol

Public Functions

SimpleLineSymbol(QObject *parent = nullptr)
SimpleLineSymbol(SimpleLineSymbolStyle style, const QColor &color, float width, QObject *parent = nullptr)
SimpleLineSymbol(SimpleLineSymbolStyle style, const QColor &color, float width, SimpleLineSymbolMarkerStyle markerStyle, SimpleLineSymbolMarkerPlacement markerPlacement, QObject *parent = nullptr)
~SimpleLineSymbol()
SimpleLineSymbolMarkerPlacement markerPlacement() const
SimpleLineSymbolMarkerStyle markerStyle() const
void setMarkerPlacement(SimpleLineSymbolMarkerPlacement markerPlacement)
void setMarkerStyle(SimpleLineSymbolMarkerStyle markerStyle)
void setStyle(SimpleLineSymbolStyle style)
SimpleLineSymbolStyle style() const
MultilayerPolylineSymbol *toMultilayerSymbol(QObject *parent = nullptr) const

Additional Inherited Members

Detailed Description

A line symbol based on simple patterns.

Symbols describe how graphics and features look on a map. Different symbols are used with different geometry types. Instances of this class represent simple line symbols. Line symbols are used to display graphics and features which are based on polyline geometries. Simple line symbols display predefined line style patterns such as solid, dash, dot, and so on.

Example:

Create a SimpleLineSymbol and set its style, color, and width:

SimpleLineSymbol* simpleLineSymbol = new SimpleLineSymbol(SimpleLineSymbolStyle::Dash, QColor(Qt::green), 2.0, this);

Member Function Documentation

SimpleLineSymbol::SimpleLineSymbol(QObject *parent = nullptr)

Default constructor with an optional parent.

SimpleLineSymbol::SimpleLineSymbol(SimpleLineSymbolStyle style, const QColor &color, float width, QObject *parent = nullptr)

Constructs a line symbol providing its style, color, width, and optional parent.

SimpleLineSymbol::SimpleLineSymbol(SimpleLineSymbolStyle style, const QColor &color, float width, SimpleLineSymbolMarkerStyle markerStyle, SimpleLineSymbolMarkerPlacement markerPlacement, QObject *parent = nullptr)

Constructs a line symbol providing its style, color, width, markerStyle, markerPlacement, and optional parent.

Note: The SimpleLineSymbolMarkerStyle::Arrow marker style is not supported in 3D scenes with GraphicsRenderingMode::Dynamic graphics rendering mode. It will not render correctly.

This function was introduced in Esri::ArcGISRuntime 100.2.

SimpleLineSymbol::~SimpleLineSymbol()

Destructor.

SimpleLineSymbolMarkerPlacement SimpleLineSymbol::markerPlacement() const

Returns the marker placement, which determines which ends the markerStyle is applied to.

This function was introduced in Esri::ArcGISRuntime 100.2.

See also setMarkerPlacement().

SimpleLineSymbolMarkerStyle SimpleLineSymbol::markerStyle() const

Returns the end marker style of the line, which is applied to the ends of the line symbol.

This function was introduced in Esri::ArcGISRuntime 100.2.

See also setMarkerStyle().

void SimpleLineSymbol::setMarkerPlacement(SimpleLineSymbolMarkerPlacement markerPlacement)

Sets the marker placement, which determines to which ends the markerStyle is applied, to markerPlacement.

This function was introduced in Esri::ArcGISRuntime 100.2.

See also markerPlacement().

void SimpleLineSymbol::setMarkerStyle(SimpleLineSymbolMarkerStyle markerStyle)

Sets the end marker style of the line, which is applied to the ends of the line symbol, to markerStyle.

Note: The SimpleLineSymbolMarkerStyle::Arrow marker style is not supported in 3D scenes with GraphicsRenderingMode::Dynamic graphics rendering mode. It will not render correctly.

This function was introduced in Esri::ArcGISRuntime 100.2.

See also markerStyle().

void SimpleLineSymbol::setStyle(SimpleLineSymbolStyle style)

Sets the style of the line.

See also style().

SimpleLineSymbolStyle SimpleLineSymbol::style() const

Returns the style of the line.

See also setStyle().

MultilayerPolylineSymbol *SimpleLineSymbol::toMultilayerSymbol(QObject *parent = nullptr) const

Returns Multilayer polyline symbol generated from simple line symbol with optional parent.

This helper method exports this symbol to MultilayerPolylineSymbol with SolidStrokeSymbolLayer and predefined collection of DashGeometricEffect.

Note: if no parent is specified, this SimpleLineSymbol will be the parent of the MultilayerPolylineSymbol.

This function was introduced in Esri::ArcGISRuntime 100.5.


Feedback on this topic?