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.
Note: Picture marker symbols without a set width or height are not scaled by the given scale, as a null value is taken to mean "render at native scale".
Return
A Result containing a BitmapDrawable. If an error occurs or if the symbol is specific to 3D, such as ModelSceneSymbol or MultilayerMeshSymbol, an error is returned.
Since
200.1.0
Parameters
The scale factor to assume when interpreting the image data. 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.
The width of the swatch in points.
The height of the swatch in points.
The background color of the swatch. The default is Color.transparent.
Creates a swatch of the symbol.
Return
A Result containing a BitmapDrawable. If an error occurs or if the symbol is specific to 3D, such as ModelSceneSymbol or MultilayerMeshSymbol, an error is returned.
Since
200.1.0
Parameters
The scale factor to assume when interpreting the image data. 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.
The width of the swatch in points.
The height of the swatch in points.
The geometry of the symbol to be drawn in the swatch image. The specified geometry is in points, 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 points 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. The default is Color.TRANSPARENT.