We want to fill the area with a custom hatch pattern, So if you want to imagine an example code it would be something like this
protected override void DrawCore(IEnumerable<Feature> features, GeoCanvas canvas, Collection<SimpleCandidate> labelsInThisLayer, Collection<SimpleCandidate> labelsInAllLayers)
{
var allPolygonFeatures = features.Where(feature => feature.GetShape() is AreaBaseShape).ToArray();
foreach (var feature in allPolygonFeatures)
{
var areaShapeBase = feature.GetShape() as AreaBaseShape;
AreaStyle areaStyle = new AreaStyle();
CustomHatchPattern MyCustomHatchPattern = new CustomHatchPattern(@"*BRASS, Brass material
0, 0,0, 0,.25
0, 0,.125, 0,.25, .125,-.0625");
areaStyle.Advanced.FillCustomBrush = new GeoHatchBrush(MyCustomHatchPattern, GeoColor.SimpleColors.Transparent);
areaStyle.OutlinePen = new GeoPen(GeoColor.FromArgb(255, 118, 138, 69), 1);
areaStyle.Draw(new[] { areaShapeBase }, canvas, labelsInThisLayer, labelsInAllLayers);
}
}
Please note: this is a custom style and ofcourse the CustomHatchPattern object is a sample class to show we intent to use the class, the *xyz is the name of a pattern which if needed we could remove also from the string, I hope I could clear the requirement.
Kind Regards,
Syed