create Swatch
Creates a swatch of the symbol. This method will scale the symbol up or down in order to fit it in to the desired width and height of the swatch.
Return
A Result containing a swatch image. Null is returned if an error occurs or if the symbol is specific to 3D, such as ModelSceneSymbol, MultilayerMeshSymbol, or MultilayerPointSymbol that includes a ModelSymbolLayer.
Since
200.1.0
Parameters
The number of pixels per DIP (sometimes referred to as screen density or device pixel ratio). This value is used to scale symbology when rendering the swatch. The value should be set appropriately in order to render swatches at the correct scale for a given display. Note: Picture marker symbols without a set width or height are not scaled by screen scale, as unset width and height are taken to mean "render at native pixel scale".
The width of the swatch in device-independent pixels (DIPs).
The height of the swatch in device-independent pixels (DIPs).
The background color of the swatch. Can be null, in which case a transparent background is used.
Creates a swatch of the symbol.
Return
A Result containing a swatch image. An error occurs if the symbol is specific to 3D, such as ModelSceneSymbol, MultilayerMeshSymbol, or MultilayerPointSymbol that includes a ModelSymbolLayer.
Since
200.1.0
Parameters
The number of pixels per DIP (sometimes referred to as screen density or device pixel ratio). This value is used to scale symbology when rendering the swatch. The value should be set appropriately in order to render swatches at the correct scale for a given display. Note: Picture marker symbols without a set width or height are not scaled by screen scale, as unset width and height are taken to mean "render at native pixel scale".
The width of the swatch in device-independent pixels (DIPs).
The height of the swatch in device-independent pixels (DIPs).
The geometry of the symbol to be drawn in the swatch image. The specified geometry is in DIPs, with the point {0,0} located at the center of the swatch image. The X-axis increases towards the right 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 (Point, Polyline, Polygon) should correspond to the symbol type (MarkerSymbol, LineSymbol, FillSymbol). The geometry's spatial reference is ignored.
The background color of the swatch. Can be null, in which case a transparent background is used.