PictureFillSymbol Class

  • PictureFillSymbol
  • class Esri::ArcGISRuntime::PictureFillSymbol

    Uses an image to symbolize the fill for a Polygon GeoElement. More...

    Header: #include <PictureFillSymbol.h>
    Since: Esri::ArcGISRuntime 100.1
    Inherits: Esri::ArcGISRuntime::FillSymbol, Esri::ArcGISRuntime::Loadable, and Esri::ArcGISRuntime::RemoteResource

    This class was introduced in Esri::ArcGISRuntime 100.1.

    Public Functions

    PictureFillSymbol(const QUrl &url, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)
    PictureFillSymbol(const QUrl &url, QObject *parent = nullptr)
    PictureFillSymbol(const QImage &image, QObject *parent = nullptr)
    virtual ~PictureFillSymbol() override
    double angle() const
    float height() const
    QImage image() const
    float opacity() const
    double scaleX() const
    double scaleY() const
    void setAngle(double angle)
    void setHeight(float height)
    void setOpacity(float opacity)
    void setScaleX(double scaleX)
    void setScaleY(double scaleY)
    void setWidth(float width)
    Esri::ArcGISRuntime::MultilayerPolygonSymbol *toMultilayerSymbol() const
    float width() const

    Reimplemented Public Functions

    virtual void cancelLoad() override
    virtual Esri::ArcGISRuntime::Credential *credential() const override
    virtual void load() override
    virtual Esri::ArcGISRuntime::Error loadError() const override
    virtual Esri::ArcGISRuntime::LoadStatus loadStatus() const override
    virtual Esri::ArcGISRuntime::RequestConfiguration requestConfiguration() const override
    virtual void retryLoad() override
    virtual void setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration) override
    virtual QUrl url() const override

    Signals

    void doneLoading(Esri::ArcGISRuntime::Error loadError)
    void loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)

    Detailed Description

    Supported image formats are BMP, GIF, ICO, JPEG, and PNG. Animated GIF is not supported.

    Symbols describe how graphics and features look on a map. Different symbols are used with different geometry types. Instances of this class represent picture fill symbols. Fill symbols are used with graphics and features that are based on Polygon geometries. The symbol defines how to fill the interior of a polygon using pictures.

    Example:

    Create a PictureFillSymbol and set its URL to an online PNG:

    const QUrl pictureFillSymbolUrl("http://static.arcgis.com/images/Symbols/Basic/YellowStickpin.png");
    PictureFillSymbol* pictureFillSymbol = new PictureFillSymbol(pictureFillSymbolUrl, this);

    See also Symbol, JsonSerializable, Loadable, and RemoteResource.

    Member Function Documentation

    PictureFillSymbol::PictureFillSymbol(const QUrl &url, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)

    Constructor to initialize a picture fill symbol with the provided url to an image, a credential for the secured resource, and optional parent.

    The URL can be provided as a path to a local file (file:/<path to file>), path to a resource image (qrc:/<path to resource image>), or a path to an HTTP URL image (http://path to image).

    A Credential is specified if the image needs authentication to gain access to it.

    PictureFillSymbol::PictureFillSymbol(const QUrl &url, QObject *parent = nullptr)

    Constructor to initialize a picture fill symbol with the provided url to an image and optional parent.

    The URL can be provided as a path to a local file ("file:/<path to file>"), path to a resource image ("qrc:/<path to resource image>"), or a path to an HTTP URL image ("http://path to image"). Supported image formats are BMP, GIF, ICO, JPEG, and PNG. Animated GIF is not supported.

    PictureFillSymbol::PictureFillSymbol(const QImage &image, QObject *parent = nullptr)

    Constructor to initialize a picture fill symbol with the provided image and optional parent.

    Supported image formats are BMP, GIF, ICO, JPEG, and PNG. Animated GIF is not supported.

    [signal] void PictureFillSymbol::doneLoading(Esri::ArcGISRuntime::Error loadError)

    Signal emitted when this object is done loading.

    • loadError - Details about any error that may have occurred.

    Note: If there is a load error it will also be emitted on the errorOccurred signal.

    See also Loadable and Object.

    [signal] void PictureFillSymbol::loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)

    Signal emitted when the load status changes for this object.

    See also Loadable.

    [override virtual] PictureFillSymbol::~PictureFillSymbol()

    Destructor.

    double PictureFillSymbol::angle() const

    Returns the angle of the picture fill symbol in degrees (from 0 to 360).

    Defaults to 0.0. The rotation is clockwise.

    See also setAngle().

    [override virtual] void PictureFillSymbol::cancelLoad()

    Reimplements: Loadable::cancelLoad().

    See Loadable.

    [override virtual] Esri::ArcGISRuntime::Credential *PictureFillSymbol::credential() const

    Reimplements: RemoteResource::credential() const.

    Returns the credential to be used to access a secured image URL if provided.

    float PictureFillSymbol::height() const

    Returns the height of the symbol in device independent pixels (DIPs).

    Defaults to the size of the image.

    See also setHeight().

    QImage PictureFillSymbol::image() const

    Returns the picture fill symbol image once loaded.

    If a URL was provided for the picture fill symbol, an attempt to load the symbol must occur and succeed, before the image can be returned from this function. Prior to loading in this case, this will return a null QImage.

    Returned images are in the QImage::Format_ARGB32_Premultiplied format.

    [override virtual] void PictureFillSymbol::load()

    Reimplements: Loadable::load().

    See Loadable.

    [override virtual] Esri::ArcGISRuntime::Error PictureFillSymbol::loadError() const

    Reimplements: Loadable::loadError() const.

    See Loadable.

    [override virtual] Esri::ArcGISRuntime::LoadStatus PictureFillSymbol::loadStatus() const

    Reimplements: Loadable::loadStatus() const.

    See Loadable.

    float PictureFillSymbol::opacity() const

    Returns the opacity of the symbol.

    Defaults to 1.0 (fully opaque). Permitted values range between 0-1.

    See also setOpacity().

    [override virtual] Esri::ArcGISRuntime::RequestConfiguration PictureFillSymbol::requestConfiguration() const

    Reimplements: RemoteResource::requestConfiguration() const.

    Returns the RequestConfiguration in use by this symbol.

    See also setRequestConfiguration().

    [override virtual] void PictureFillSymbol::retryLoad()

    Reimplements: Loadable::retryLoad().

    See Loadable.

    double PictureFillSymbol::scaleX() const

    Returns the x scale of the picture fill symbol.

    Defaults to 1.0.

    See also setScaleX().

    double PictureFillSymbol::scaleY() const

    Returns the y scale of the picture fill symbol.

    Defaults to 1.0.

    See also setScaleY().

    void PictureFillSymbol::setAngle(double angle)

    Sets the angle of the picture fill symbol in degrees (from 0 to 360).

    Defaults to 0.0. The rotation is clockwise.

    See also angle().

    void PictureFillSymbol::setHeight(float height)

    Sets the height of the symbol in device independent pixels (DIPs).

    Defaults to the size of the image.

    See also height().

    void PictureFillSymbol::setOpacity(float opacity)

    Sets the opacity of the symbol.

    Defaults to 1.0 (fully opaque). Permitted values range between 0-1.

    See also opacity().

    [override virtual] void PictureFillSymbol::setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration)

    Reimplements: RemoteResource::setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration).

    Sets configuration parameters used for network requests sent by this symbol to requestConfiguration.

    See also requestConfiguration().

    void PictureFillSymbol::setScaleX(double scaleX)

    Sets the x scale of the picture fill symbol to scaleX.

    Defaults to 1.0.

    See also scaleX().

    void PictureFillSymbol::setScaleY(double scaleY)

    Sets the y scale of the picture fill symbol to scaleY.

    Defaults to 1.0.

    See also scaleY().

    void PictureFillSymbol::setWidth(float width)

    Sets the width of the symbol in device independent pixels (DIPs).

    Defaults to the size of the image.

    See also width().

    Esri::ArcGISRuntime::MultilayerPolygonSymbol *PictureFillSymbol::toMultilayerSymbol() const

    Returns a multilayer polygon symbol, generated from picture fill symbol.

    Given a picture fill symbol, this method will return a MultilayerPolygonSymbol with a PictureFillSymbolLayer.

    This function was introduced in Esri::ArcGISRuntime 100.13.

    [override virtual] QUrl PictureFillSymbol::url() const

    Reimplements: RemoteResource::url() const.

    Returns the URL path to the picture fill symbol image.

    This could be a local file path, Qt resource path, or HTTP path to the image.

    float PictureFillSymbol::width() const

    Returns the width of the symbol in device independent pixels (DIPs).

    Defaults to the size of the image.

    See also setWidth().

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