ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / SymbolFactory Class / ConstructHatchFill Method / ConstructHatchFill(CIMStroke,Double,Double,Double) Method
ArcGIS.Core.CIM.CIMStroke
The angle for the hatch pattern.
The separation for the hatch pattern.
The offset value. ArcGIS.Core.CIM.CIMHatchFill.OffsetX and ArcGIS.Core.CIM.CIMHatchFill.OffsetY will get set to this value.
Example

In This Topic
    ConstructHatchFill(CIMStroke,Double,Double,Double) Method
    In This Topic
    Constructs a hatch fill with the specified parameters.
    Syntax
    Public Overloads Function ConstructHatchFill( _
       ByVal lineStroke As CIMStroke, _
       ByVal angle As Double, _
       ByVal separation As Double, _
       Optional ByVal offset As Double _
    ) As CIMFill

    Parameters

    lineStroke
    ArcGIS.Core.CIM.CIMStroke
    angle
    The angle for the hatch pattern.
    separation
    The separation for the hatch pattern.
    offset
    The offset value. ArcGIS.Core.CIM.CIMHatchFill.OffsetX and ArcGIS.Core.CIM.CIMHatchFill.OffsetY will get set to this value.

    Return Value

    Example
    Snippet Cross hatch
    /// <summary>
    /// Create a polygon symbol using the ConstructHatchFill method . <br/>
    /// ![PolygonSymbolDiagonalCrossHatch](http://Esri.github.io/arcgis-pro-sdk/images/Symbology/ConstructHatchFill.png)
    /// </summary>
    /// <returns></returns>
    private static Task<CIMPolygonSymbol> CreateHatchFillPolygonAsync()
    {
      return QueuedTask.Run<CIMPolygonSymbol>(() =>
      {
        CIMStroke lineStroke = SymbolFactory.Instance.ConstructStroke(CIMColor.CreateRGBColor(51, 51, 51, 60), 4, SimpleLineStyle.Solid);
        //gradient
        var hatchFill = SymbolFactory.Instance.ConstructHatchFill(lineStroke, 45, 6, 0);
    
        List<CIMSymbolLayer> symbolLayers = new List<CIMSymbolLayer>
        {
          hatchFill
        };
        return new CIMPolygonSymbol() { SymbolLayers = symbolLayers.ToArray() };
      });
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.1 or higher.
    See Also