Skip To Content ArcGIS for Developers Sign In Dashboard

PictureFillSymbolLayer Class

(Esri::ArcGISRuntime::PictureFillSymbolLayer)

A picture fill symbol layer is a symbol layer intended for use with polygon geometries. More...

Header: #include <PictureFillSymbolLayer>
Since: Esri::ArcGISRuntime 100.5
Inherits: FillSymbolLayer, Loadable, and RemoteResource

Public Functions

PictureFillSymbolLayer(const QImage &image, QObject *parent = nullptr)
PictureFillSymbolLayer(const QUrl &url, QObject *parent = nullptr)
PictureFillSymbolLayer(const QUrl &url, Credential *credential, QObject *parent = nullptr)
~PictureFillSymbolLayer()
QImage image() const
void setTintColor(const QColor &tintColor)
QColor tintColor() const

Reimplemented Public Functions

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

Signals

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

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 1 public variable inherited from QObject
  • 10 static public members inherited from QObject
  • 9 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

A picture fill symbol layer is a symbol layer intended for use with polygon geometries.

This symbol layer, if it is the sole symbol layer in a MultilayerPolygonSymbol, fills the geometry associated with the symbol with the specified image. The image, should it not fill the geometry, will be tiled throughout the fill.

The PictureFillSymbolLayer is also used to represent the Web Scene specification's Icon3DSymbolLayers. IconSymbol3DLayers from Web Scene JSON - as long as those Icon3DSymbolLayers contain pictures - rather than primitives or vector paths, those symbol layers are represented as PictureFillSymbolLayer. If those Icon3DSymbolLayers are primitives or vector paths, they are represented as VectorMarkerSymbolLayer.

The PictureFillSymbolLayer provides a similar user experience to the simple PictureFillSymbol, but can be used in a MultilayerSymbol.

Example:

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

const QUrl pictureFillSymbolLayerUrl("http://static.arcgis.com/images/Symbols/Basic/YellowStickpin.png");
PictureFillSymbolLayer* pictureFillSymbolLayer = new PictureFillSymbolLayer(pictureFillSymbolLayerUrl, this);

See also Symbol, Loadable, and RemoteResource.

Member Function Documentation

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

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

PictureFillSymbolLayer::PictureFillSymbolLayer(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").

PictureFillSymbolLayer::PictureFillSymbolLayer(const QUrl &url, 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.

PictureFillSymbolLayer::~PictureFillSymbolLayer()

Destructor.

[virtual] void PictureFillSymbolLayer::cancelLoad()

Reimplemented from Loadable::cancelLoad().

See Loadable.

[virtual] Credential *PictureFillSymbolLayer::credential() const

Reimplemented from RemoteResource::credential().

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

[signal] void PictureFillSymbolLayer::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.

QImage PictureFillSymbolLayer::image() const

Returns the picture fill symbol image once loaded.

If a URL was provided for the picture fill symbol layer, 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.

[virtual] void PictureFillSymbolLayer::load()

Reimplemented from Loadable::load().

See Loadable.

[virtual] Error PictureFillSymbolLayer::loadError() const

Reimplemented from Loadable::loadError().

See Loadable.

[virtual] LoadStatus PictureFillSymbolLayer::loadStatus() const

Reimplemented from Loadable::loadStatus().

See Loadable.

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

Signal emitted when the load status changes for this object.

See also Loadable.

[virtual] RequestConfiguration PictureFillSymbolLayer::requestConfiguration() const

Reimplemented from RemoteResource::requestConfiguration().

Returns the RequestConfiguration in use by this symbol.

See also setRequestConfiguration().

[virtual] void PictureFillSymbolLayer::retryLoad()

Reimplemented from Loadable::retryLoad().

See Loadable.

[virtual] void PictureFillSymbolLayer::setRequestConfiguration(const RequestConfiguration &requestConfiguration)

Reimplemented from RemoteResource::setRequestConfiguration().

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

See also requestConfiguration().

void PictureFillSymbolLayer::setTintColor(const QColor &tintColor)

Sets the tint color of the picture fill symbol layer with the specified tintColor.

This function was introduced in Esri::ArcGISRuntime 100.6.

See also tintColor().

QColor PictureFillSymbolLayer::tintColor() const

Returns the tint color of the picture fill symbol layer.

The tint color is applied to the entire image by multiplying each RGB color channel in the image by the corresponding color channel of the tint color. The default color is white with 100% opacity (RGBA (255,255,255,255)), which when applied leaves the image with its native colors and unchanged opacity. A white tint color with opacity less than 100% applies the reduced opacity without changing the image colors.

This function was introduced in Esri::ArcGISRuntime 100.6.

See also setTintColor().

[virtual] QUrl PictureFillSymbolLayer::url() const

Reimplemented from RemoteResource::url().

Returns the URL path to the picture fill symbol layer image.

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


Feedback on this topic?