HatchFillSymbolLayer Class

  • HatchFillSymbolLayer
  • class Esri::ArcGISRuntime::HatchFillSymbolLayer

    A HatchFillSymbolLayer represents a polygon geometry filled with hatch lines. More...

    Header: #include <HatchFillSymbolLayer.h>
    Since: Esri::ArcGISRuntime 100.5
    Inherits: Esri::ArcGISRuntime::FillSymbolLayer

    Public Functions

    HatchFillSymbolLayer(QObject *parent = nullptr)
    HatchFillSymbolLayer(Esri::ArcGISRuntime::MultilayerPolylineSymbol *multilayerPolylineSymbol, double angle, QObject *parent = nullptr)
    virtual ~HatchFillSymbolLayer() override
    double angle() const
    Esri::ArcGISRuntime::MultilayerPolylineSymbol *polyline() const
    double separation() const
    void setAngle(double angle)
    void setPolyline(Esri::ArcGISRuntime::MultilayerPolylineSymbol *polyline)
    void setSeparation(double separation)

    Detailed Description

    "Hatch lines" are uniformly spaced parallel lines. A HatchFillSymbolLayer, in a multilayer polygon symbol, fills the geometry of the symbol with the specified hatch lines. Each hatch line is itself a multilayer polyline symbol. You can define a custom hatch line (through the setPolyline and certain create methods) that is repeated in parallel throughout the inside of the geometry attatched to a multilayer polygon symbol's geometry.

    The HatchFillSymbolLayer provides a similar experience to the SimpleFillSymbol, but with more customizability. Whereas you can select from a list of predefined hatch fill styles for a SimpleFillSymbol, the HatchFillSymbolLayer allows you to specify a fully-customized symbol to use as the hatch line. You can also adjust line, angle, and separation distance.

    Member Function Documentation

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

    Default constructor with an optional parent.

    HatchFillSymbolLayer::HatchFillSymbolLayer(Esri::ArcGISRuntime::MultilayerPolylineSymbol *multilayerPolylineSymbol, double angle, QObject *parent = nullptr)

    Constructor with multilayerPolylineSymbol, angle and an optional parent.

    angle must be in degrees and represents the angle to rotate the hatch lines. The multilayerPolylineSymbol will be used as the hatch line of the symbol layer.

    Angle values can be negative. Angle rotation is counterclockwise from horizontal.

    [override virtual] HatchFillSymbolLayer::~HatchFillSymbolLayer()

    Destructor.

    double HatchFillSymbolLayer::angle() const

    Returns the angle, in degrees measured counterclockwise from East.

    This is the angle of rotation of the hatch lines in the HatchFillSymbolLayer. The hatch lines rotate counterclockwise from horizontal. If there is no angle set, the method returns 0.0.

    See also setAngle().

    Esri::ArcGISRuntime::MultilayerPolylineSymbol *HatchFillSymbolLayer::polyline() const

    Returns the polyline symbol used to symbolize the hatch lines of the HatchFillSymbolLayer.

    If no polyline is set, the property returns a default polyline containing a single SolidStrokeSymbolLayer, with width of 1.3333 DIPs (1.0 points) and opaque gray color.

    See also setPolyline().

    double HatchFillSymbolLayer::separation() const

    Returns the distance between the line symbols in the hatch pattern in DIPs.

    If there is no separation set, the method returns 5.3333 DIPs, converted from the internal default 4.0 points. Separation values must be non-negative.

    See also setSeparation().

    void HatchFillSymbolLayer::setAngle(double angle)

    Sets the angle, in degrees, to angle.

    The hatch lines rotate counterclockwise from East.

    See also angle().

    void HatchFillSymbolLayer::setPolyline(Esri::ArcGISRuntime::MultilayerPolylineSymbol *polyline)

    Sets the polyline symbol used to symbolize the hatch lines to polyline.

    See also polyline().

    void HatchFillSymbolLayer::setSeparation(double separation)

    Sets the distance between the line symbols to separation.

    The separation units is DIPs.

    See also separation().

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