SimpleFillSymbol Class

  • SimpleFillSymbol
  • class Esri::ArcGISRuntime::SimpleFillSymbol

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

    Header: #include <SimpleFillSymbol.h>
    Since: Esri::ArcGISRuntime 100.0
    Inherits: Esri::ArcGISRuntime::FillSymbol

    Public Functions

    SimpleFillSymbol(QObject *parent = nullptr)
    SimpleFillSymbol(Esri::ArcGISRuntime::SimpleFillSymbolStyle style, const QColor &color, QObject *parent = nullptr)
    SimpleFillSymbol(Esri::ArcGISRuntime::SimpleFillSymbolStyle style, const QColor &color, Esri::ArcGISRuntime::LineSymbol *outline, QObject *parent = nullptr)
    virtual ~SimpleFillSymbol() override
    void setStyle(Esri::ArcGISRuntime::SimpleFillSymbolStyle style)
    Esri::ArcGISRuntime::SimpleFillSymbolStyle style() const
    Esri::ArcGISRuntime::MultilayerPolygonSymbol *toMultilayerSymbol(QObject *parent = nullptr) const
    bool operator!=(const Esri::ArcGISRuntime::SimpleFillSymbol &other) const
    bool operator==(const Esri::ArcGISRuntime::SimpleFillSymbol &other) const

    Detailed Description

    Simple fill symbols can fill the interior of polygons using predefined fill patterns such as SimpleFillSymbolStyle::BackwardDiagonal, SimpleFillSymbolStyle::Vertical, SimpleFillSymbolStyle::Horizontal and SimpleFillSymbolStyle::Cross, as well as SimpleFillSymbolStyle::Solid colors. These symbols can have an optional outline, which is defined by SimpleLineSymbol.

    Example:

    Create a SimpleFillSymbol and set its style, color, opacity, and outline:

    SimpleFillSymbol* simpleFillSymbol = new SimpleFillSymbol(SimpleFillSymbolStyle::Solid, QColor(Qt::red), this);
    SimpleLineSymbol* outline = new SimpleLineSymbol(SimpleLineSymbolStyle::Solid, QColor(Qt::black), 2.0, this);
    simpleFillSymbol->setOutline(outline);

    See also Symbol.

    Member Function Documentation

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

    Creates a simple fill symbol object with default values.

    • 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.

    SimpleFillSymbol::SimpleFillSymbol(Esri::ArcGISRuntime::SimpleFillSymbolStyle style, const QColor &color, QObject *parent = nullptr)

    Constructs a simple fill symbol providing a style, color, and optional parent.

    SimpleFillSymbol::SimpleFillSymbol(Esri::ArcGISRuntime::SimpleFillSymbolStyle style, const QColor &color, Esri::ArcGISRuntime::LineSymbol *outline, QObject *parent = nullptr)

    Creates a simple fill symbol object with some initial values.

    • style - Indicates the type of simple fill symbol to create.
    • color - The color of the simple fill symbol.
    • outline - The outline of the simple fill symbol.
    • parent - The optional parent QObject.

    [override virtual] SimpleFillSymbol::~SimpleFillSymbol()

    Destructor.

    void SimpleFillSymbol::setStyle(Esri::ArcGISRuntime::SimpleFillSymbolStyle style)

    Sets the style of the symbol's fill pattern.

    See also style().

    Esri::ArcGISRuntime::SimpleFillSymbolStyle SimpleFillSymbol::style() const

    Returns the style of the symbol's fill pattern.

    See also setStyle().

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

    Returns a Multilayer polygon symbol generated from simple fill symbol with optional parent.

    This method allows you to create complex and custom symbols with multiple layers of different types of symbology. Simple fill symbol provides a factory of predefined fill styles such as cross and backward_diagonal. This method generates a MultilayerPolygonSymbol with a HatchFillSymbolLayer for any of the styles containing lines, or a SolidFillSymbolLayer if the fill style is SimpleFillSymbolStyle::Solid.

    Note: if no parent is specified, this SimpleFillSymbol will be the parent of the MultilayerPolygonSymbol.

    This function was introduced in Esri::ArcGISRuntime 100.5.

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

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