Parameters
- fileName
- Path to a png, jpg, bmp file.
- size
- The size.
/// <summary> /// Constructs a picture fill with the specified parameters. /// ![ConstructPictureFill](http://Esri.github.io/arcgis-pro-sdk/images/Symbology/ConstructPictureFill.png) /// </summary> /// <returns></returns> private static Task<CIMPolygonSymbol> CreatePictureFillPolygonAsync() { return QueuedTask.Run<CIMPolygonSymbol>(() => { CIMStroke outline = SymbolFactory.Instance.ConstructStroke(CIMColor.CreateRGBColor(110, 110, 110), 2.0, SimpleLineStyle.Solid); //picture var imgPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"Images\CaliforniaEmblem.png"); var pictureFill = SymbolFactory.Instance.ConstructPictureFill(imgPath, 64); List<CIMSymbolLayer> symbolLayers = new() { outline, pictureFill }; return new CIMPolygonSymbol() { SymbolLayers = symbolLayers.ToArray() }; }); }
Target Platforms: Windows 11, Windows 10