SimpleFillSymbol Class
Used to draw polygon features on a layer using simple patterns. 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
Fill symbols are used with graphics which are based on a polygon geometry. The symbol can fill the interior of a polygon graphic with a solid color. In addition, the symbol can have an optional outline which is defined by a line symbol.
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)
Default constructor with an optional parent.
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.
Multilayer symbol API allows users to create complex and custom symbols with multiple layers of different types of symbology. Simple fill symbol has a factory of predefined fill styles like cross, backward_diagonal etc. This helper method exports this symbol to MultilayerPolygonSymbol with HatchFillSymbolLayer defining the fill patterns.
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.