Skip To Content ArcGIS for Developers Sign In Dashboard

PictureFillSymbol Class

(Esri::ArcGISRuntime::PictureFillSymbol)

A fill symbol based on an image. More...

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

Public Functions

PictureFillSymbol(const QImage &image, QObject *parent = nullptr)
PictureFillSymbol(const QUrl &url, QObject *parent = nullptr)
PictureFillSymbol(const QUrl &url, Credential *credential, QObject *parent = nullptr)
~PictureFillSymbol()
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)
float width() 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

Detailed Description

A fill symbol based on an image.

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 QImage &image, QObject *parent = nullptr)

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

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").

PictureFillSymbol::PictureFillSymbol(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.

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().

[virtual] void PictureFillSymbol::cancelLoad()

Reimplemented from Loadable::cancelLoad().

See Loadable.

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

Reimplemented from RemoteResource::credential().

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

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

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.

[virtual] void PictureFillSymbol::load()

Reimplemented from Loadable::load().

See Loadable.

[virtual] Error PictureFillSymbol::loadError() const

Reimplemented from Loadable::loadError().

See Loadable.

[virtual] LoadStatus PictureFillSymbol::loadStatus() const

Reimplemented from Loadable::loadStatus().

See Loadable.

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

Signal emitted when the load status changes for this object.

See also 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().

[virtual] RequestConfiguration PictureFillSymbol::requestConfiguration() const

Reimplemented from RemoteResource::requestConfiguration().

Returns the RequestConfiguration in use by this symbol.

See also setRequestConfiguration().

[virtual] void PictureFillSymbol::retryLoad()

Reimplemented from 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().

[virtual] void PictureFillSymbol::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 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().

[virtual] QUrl PictureFillSymbol::url() const

Reimplemented from RemoteResource::url().

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().


Feedback on this topic?