LineSymbol Class

  • LineSymbol
  • class Esri::ArcGISRuntime::LineSymbol

    A base class for line symbols used to symbolize graphics and features (collectively referred to as geoelements) that have polyline geometry. More...

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

    Esri::ArcGISRuntime::SimpleLineSymbol

    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
    bool operator!=(const Esri::ArcGISRuntime::LineSymbol &other) const
    bool operator==(const Esri::ArcGISRuntime::LineSymbol &other) 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 such as boundaries, transportation routes and utility pipelines. Line symbols can also be used as an outline for fill symbols (FillSymbol::outline) and marker symbols (SimpleMarkerSymbol::outline).

    Member Function Documentation

    [explicit 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), 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 (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.

    The default value is light gray.

    See also setColor().

    bool LineSymbol::isAntiAlias() const

    Returns true if the line symbol is drawn with anti-aliasing, false otherwise.

    void LineSymbol::setAntiAlias(bool antiAlias)

    Sets the antiAlias to antiAlias.

    See also isAntiAlias.

    void LineSymbol::setColor(const QColor &color)

    Sets the color to color.

    See also color.

    void LineSymbol::setWidth(float width)

    Sets the width to width.

    See also width.

    float LineSymbol::width() const

    Returns the thickness of the line symbol outline in device-independent pixels (DIPs).

    The default value is 1.0.

    See also setWidth().

    [since Esri::ArcGISRuntime 200.2] bool LineSymbol::operator!=(const Esri::ArcGISRuntime::LineSymbol &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 LineSymbol::operator==.

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

    Returns tests if this line symbol is equal to another line symbol.

    • other - The line symbol to be compared.

    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.