ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / SymbolFactory Class / ConstructPictureFill Method
Path to a png, jpg, bmp file.
The size.
Example

In This Topic
    ConstructPictureFill Method (SymbolFactory)
    In This Topic
    Constructs a picture fill with the specified parameters.
    Syntax
    public CIMFill ConstructPictureFill( 
       string fileName,
       double size
    )
    Public Function ConstructPictureFill( _
       ByVal fileName As String, _
       ByVal size As Double _
    ) As CIMFill

    Parameters

    fileName
    Path to a png, jpg, bmp file.
    size
    The size.

    Return Value

    Remarks
    Null is returned if the file is not a jpg, png or bmp file. Or if there is an error reading the file.
    Example
    Snippet Picture fill
    /// <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() };
      });
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.1 or higher.
    See Also