SolidStrokeSymbolLayer Class

  • SolidStrokeSymbolLayer
  • class Esri::ArcGISRuntime::SolidStrokeSymbolLayer

    A class for stroke symbol layers with customized geometric effects. Currently it supports only dash effects. More...

    Header: #include <SolidStrokeSymbolLayer.h>
    Since: Esri::ArcGISRuntime 100.5
    Inherits: Esri::ArcGISRuntime::StrokeSymbolLayer

    Public Functions

    SolidStrokeSymbolLayer(QObject *parent = nullptr)
    SolidStrokeSymbolLayer(double width, const QColor &color, QObject *parent = nullptr)
    SolidStrokeSymbolLayer(double width, const QColor &color, const QList<Esri::ArcGISRuntime::GeometricEffect *> &geometricEffects, QObject *parent = nullptr)
    SolidStrokeSymbolLayer(double width, const QColor &color, const QList<Esri::ArcGISRuntime::GeometricEffect *> &geometricEffects, Esri::ArcGISRuntime::StrokeSymbolLayerLineStyle3D lineStyle3D, QObject *parent = nullptr)
    virtual ~SolidStrokeSymbolLayer() override
    QColor color() const
    Esri::ArcGISRuntime::GeometricEffectListModel *geometricEffects() const
    void setColor(const QColor &color)

    Detailed Description

    Commonly used in line symbols to describe the appearance of the line, or in polygon symbols as an outline. A SolidStrokeSymbolLayer represents a polyline geometry symbolized with a solid color.

    This symbol layer, in a MultilayerPolylineSymbol, colors the geometry of the line with the specified solid color. The class also allows setting a collection of geometric effects, which modify the stroke in various ways (see documentation for geometric effects).

    The SolidStrokeSymbolLayer is used to represent the Web Scene specification's LineSymbol3DLayer and PathSymbol3DLayer. LineSymbol3DLayer maps to the 'strip' 3D line style of SolidStrokeSymbolLayer, and PathSymbol3DLayer maps to the 'tube' 3D line style.

    The SolidStrokeSymbolLayer provides a similar user experience to the SimpleLineSymbol, but, since it is a symbol layer, can be used in a MultilayerSymbol. The simple line styles of the SimpleLineSymbol are represented here by the DashGeometricEffect, but all dash patterns are custom. A solid stroke symbol layer in a multilayer polygon symbol will act as the outline of the fill.

    See also DashGeometricEffect.

    Member Function Documentation

    [explicit] SolidStrokeSymbolLayer::SolidStrokeSymbolLayer(QObject *parent = nullptr)

    Create a solid stroke symbol layer with no parameters.

    • parent - The optional parent QObject.

    The default line will have the following default properties: width of 4.0 points (5.333 DIPs), 'round' caps, 'strip' 3D line style, a solid opaque black color, and no geometric effects.

    SolidStrokeSymbolLayer::SolidStrokeSymbolLayer(double width, const QColor &color, QObject *parent = nullptr)

    Create a solid stroke symbol layer with width and color.

    • width - The desired width of the layer.
    • color - The desired color for the layer.
    • parent - The optional parent QObject.

    Create a solid stroke symbol layer with a stroke width and a color. The function sets the width and color on the newly-created solid stroke. The other properties are defaulted as follows: caps are 'round,' and the 3D line style is 'strip.'.

    SolidStrokeSymbolLayer::SolidStrokeSymbolLayer(double width, const QColor &color, const QList<Esri::ArcGISRuntime::GeometricEffect *> &geometricEffects, QObject *parent = nullptr)

    Create a solid stroke symbol layer with width, color and geometric effects.

    • width - The desired width of the layer.
    • color - The desired color for the layer.
    • geometricEffects - The effects to be applied to the layer, e.g., dash patterns.
    • parent - The optional parent QObject.

    Create a solid stroke symbol layer with a stroke width, a color, and a collection of geometric effects. The function sets the width, color, and geometric effects on the newly-created solid stroke. The other properties are defaulted as follows: caps are 'round,' and the 3D line style is 'strip.'.

    See also DashGeometricEffect.

    SolidStrokeSymbolLayer::SolidStrokeSymbolLayer(double width, const QColor &color, const QList<Esri::ArcGISRuntime::GeometricEffect *> &geometricEffects, Esri::ArcGISRuntime::StrokeSymbolLayerLineStyle3D lineStyle3D, QObject *parent = nullptr)

    Create a solid stroke symbol layer with width, color, geometric effects and 3D line style.

    • width - The desired width for the symbol layer.
    • color - The desired color for the symbol layer.
    • geometricEffects - The effects to be applied to the symbol layer, e.g., dash patterns.
    • lineStyle3D - The desired 3D line style.
    • parent - The optional parent QObject.

    Create a solid stroke symbol layer with a stroke width, a color, a collection of geometric effects, and a 3D line style. The function sets the width, color, geometric effects, and 3D line style on the newly-created solid stroke. Stroke caps default to 'round'.

    See also DashGeometricEffect.

    [override virtual] SolidStrokeSymbolLayer::~SolidStrokeSymbolLayer()

    Destructor.

    QColor SolidStrokeSymbolLayer::color() const

    Returns the color of a solid stroke symbol layer.

    The solid color of the SolidStrokeSymbolLayer. The stroke will render with the specified color. When getting the color from a symbol, the consensus value (for all layers) is reported. If there is no consensus (one or more layers have different colors), an empty 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 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().

    Esri::ArcGISRuntime::GeometricEffectListModel *SolidStrokeSymbolLayer::geometricEffects() const

    Returns the collection of geometric effects held by a solid stroke symbol layer.

    The collection of geometric effects held by a SolidStrokeSymbolLayer. Setting the geometric effects will apply the collection of geometric effects to the stroke when rendering. See the documentation for geometric effects to understand how they apply.

    See also DashGeometricEffect.

    void SolidStrokeSymbolLayer::setColor(const QColor &color)

    Sets the color to color.

    See also color.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.