Skip To Content ArcGIS for Developers Sign In Dashboard

SwatchOptions QML Type

Options used for creating a symbol swatch image. More...

Import Statement: import Esri.ArcGISRuntime 100.8
Since: Esri.ArcGISRuntime 100.0




Detailed Description

Note: You cannot declare or create a component of this type in QML code.

Specify the swatch options of a symbol when creating a swatch image.

If any of the options are not specified at the time the swatch image is created, then the value for it is determined as described below:

  • The geometry type is determined from the type of symbol and the extent from the size.
  • The size is determined from the size of the symbol based on the screen scale.
  • The screenScale is based on the scale density of the screen.
  • The backgroundColor defaults to transparent.

Whenever swatch options are modified for a symbol, there is an automatically triggered new request to generate a swatch image for the symbol.

Property Documentation

backgroundColor : color

The background color used for the swatch image (optional).

By default, the background color is set to transparent.

geometry : Geometry

The geometry for the symbol (optional).

The specified geometry is in DIPs, with the point {0,0} located at the centerpoint of the swatch image. The x-axis increases towards the right-hand side of the swatch image. The y-axis increases towards the top of the swatch image. For example, when creating a swatch for a MarkerSymbol, specifying a geometry of {10,10} will draw the marker 10 DIPs up and to the right of the center of the swatch. The geometry type should correspond to the symbol type. The geometry's spatial reference is ignored.

screenScale : real

The scale density of the screen used for the swatch image (optional).

By default, the screenScale is based on the scale density of the primary screen.

size : size

The size of the swatch image (optional).

By default, the swatch image will be sized based on the screen scale. The size values are measured in DIPs.

Signal Documentation


Emitted when the backgroundColor property changes.


Emitted when the geometry property changes.


Emitted when the screenScale property changes.


Emitted when the size property changes.


Emitted when any of the properties on the swatch options changes.

Feedback on this topic?