SimpleLineSymbol Class

  • SimpleLineSymbol
  • class Esri::ArcGISRuntime::SimpleLineSymbol

    Uses predefined patterns and colors to symbolize graphics and features that have polyline geometry. More...

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

    Public Functions

    SimpleLineSymbol(QObject *parent = nullptr)
    SimpleLineSymbol(Esri::ArcGISRuntime::SimpleLineSymbolStyle style, const QColor &color, float width, QObject *parent = nullptr)
    SimpleLineSymbol(Esri::ArcGISRuntime::SimpleLineSymbolStyle style, const QColor &color, float width, Esri::ArcGISRuntime::SimpleLineSymbolMarkerStyle markerStyle, Esri::ArcGISRuntime::SimpleLineSymbolMarkerPlacement markerPlacement, QObject *parent = nullptr)
    virtual ~SimpleLineSymbol() override
    Esri::ArcGISRuntime::SimpleLineSymbolMarkerPlacement markerPlacement() const
    Esri::ArcGISRuntime::SimpleLineSymbolMarkerStyle markerStyle() const
    void setMarkerPlacement(Esri::ArcGISRuntime::SimpleLineSymbolMarkerPlacement markerPlacement)
    void setMarkerStyle(Esri::ArcGISRuntime::SimpleLineSymbolMarkerStyle markerStyle)
    void setStyle(Esri::ArcGISRuntime::SimpleLineSymbolStyle style)
    Esri::ArcGISRuntime::SimpleLineSymbolStyle style() const
    Esri::ArcGISRuntime::MultilayerPolylineSymbol *toMultilayerSymbol(QObject *parent = nullptr) const
    bool operator!=(const Esri::ArcGISRuntime::SimpleLineSymbol &other) const
    bool operator==(const Esri::ArcGISRuntime::SimpleLineSymbol &other) const

    Detailed Description

    Simple line symbols display graphics using predefined line style patterns such as SimpleLineSymbolStyle::Solid, SimpleLineSymbolStyle::Dash, or SimpleLineSymbolStyle::Dot.

    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);

    See also Symbol.

    Member Function Documentation

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

    Creates a simple line symbol object.

    • parent - The optional parent QObject.

    The default values are:

    This is useful if the properties of the symbol are only known after the application is running.

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

    Creates a simple line symbol object with a style, color and width.

    • style - The type of simple line symbol to create.
    • color - The color of the simple line symbol.
    • width - The width of the simple line symbol.
    • parent - The optional parent QObject.

    [since Esri::ArcGISRuntime 100.2] SimpleLineSymbol::SimpleLineSymbol(Esri::ArcGISRuntime::SimpleLineSymbolStyle style, const QColor &color, float width, Esri::ArcGISRuntime::SimpleLineSymbolMarkerStyle markerStyle, Esri::ArcGISRuntime::SimpleLineSymbolMarkerPlacement markerPlacement, QObject *parent = nullptr)

    Creates a simple line symbol object with a style, color, width, and line end marker

    • style - The type of simple line symbol to create.
    • color - The color of the simple line symbol.
    • width - The width of the simple line symbol.
    • markerStyle - The style of simple line symbol end marker(s).
    • markerPlacement - The placement of simple line symbol end marker(s).
    • parent - The optional parent QObject.

    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.

    [override virtual] SimpleLineSymbol::~SimpleLineSymbol()

    Destructor.

    [since Esri::ArcGISRuntime 100.2] Esri::ArcGISRuntime::SimpleLineSymbolMarkerPlacement SimpleLineSymbol::markerPlacement() const

    Returns the simple line symbol end marker placement of the simple line symbol.

    This function was introduced in Esri::ArcGISRuntime 100.2.

    See also setMarkerPlacement().

    [since Esri::ArcGISRuntime 100.2] Esri::ArcGISRuntime::SimpleLineSymbolMarkerStyle SimpleLineSymbol::markerStyle() const

    Returns the simple line symbol end marker style of the simple line symbol.

    This function was introduced in Esri::ArcGISRuntime 100.2.

    See also setMarkerStyle().

    [since Esri::ArcGISRuntime 100.2] void SimpleLineSymbol::setMarkerPlacement(Esri::ArcGISRuntime::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().

    [since Esri::ArcGISRuntime 100.2] void SimpleLineSymbol::setMarkerStyle(Esri::ArcGISRuntime::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(Esri::ArcGISRuntime::SimpleLineSymbolStyle style)

    Sets the style of the line.

    See also style().

    Esri::ArcGISRuntime::SimpleLineSymbolStyle SimpleLineSymbol::style() const

    Returns the style of the line.

    See also setStyle().

    [since Esri::ArcGISRuntime 100.5] Esri::ArcGISRuntime::MultilayerPolylineSymbol *SimpleLineSymbol::toMultilayerSymbol(QObject *parent = nullptr) const

    Returns Multilayer polyline symbol generated from simple line symbol.

    • parent - The optional parent QObject.

    This method allows you to create complex and custom symbols with multiple layers of different types of symbology. Simple line symbol provides a factory of predefined line styles such as dash and dash_dot_dot. This method generates a MultilayerPolylineSymbol with a SolidStrokeSymbolLayer and a 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.

    [since Esri::ArcGISRuntime 200.2] bool SimpleLineSymbol::operator!=(const Esri::ArcGISRuntime::SimpleLineSymbol &other) const

    Inequality operator. Returns true if this object and other are not equal.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    See also SimpleLineSymbol::operator==.

    [since Esri::ArcGISRuntime 200.1] bool SimpleLineSymbol::operator==(const Esri::ArcGISRuntime::SimpleLineSymbol &other) const

    Equivalency operator.

    Returns true if this object and other are equivalent.

    This function was introduced in Esri::ArcGISRuntime 200.1.

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