public enum SimpleFillStyle : System.Enum, System.IComparable, System.IConvertible, System.IFormattable
Public Enum SimpleFillStyle Inherits System.Enum Implements System.IComparable, System.IConvertible, System.IFormattable
public enum SimpleFillStyle : System.Enum, System.IComparable, System.IConvertible, System.IFormattable
Public Enum SimpleFillStyle Inherits System.Enum Implements System.IComparable, System.IConvertible, System.IFormattable
Member | Description |
---|---|
BackwardDiagonal | A hatched fill with evenly spaced diagonal lines at a -45° angle. |
Cross | A hatched fill with evenly spaced horizontal and vertical lines. |
DiagonalCross | A hatched fill with evenly spaced diagonal lines crossing each other at 90° angles. |
ForwardDiagonal | A hatched fill with evenly spaced diagonal lines at a 45° angle. |
Horizontal | A hatched fill with evenly spaced horizontal lines. |
Null | An empty fill that does not draw. |
Solid | A uniform solid fill of one color. |
Vertical | A hatched fill with evenly spaced vertical lines. |
//Must be on QueuedTask.Run(() => { ... //Build geometry Coordinate2D center = new Coordinate2D(2, 2.75); var eabElp = new EllipticArcBuilderEx(center, 0, 1, 0.45, ArcOrientation.ArcClockwise); var ellipse = eabElp.ToSegment(); //Set symbolology, create and add element to layout CIMStroke outline = SymbolFactory.Instance.ConstructStroke( ColorFactory.Instance.GreenRGB, 2.0, SimpleLineStyle.Dot); CIMPolygonSymbol ellipseSym = SymbolFactory.Instance.ConstructPolygonSymbol( ColorFactory.Instance.GreyRGB, SimpleFillStyle.Vertical, outline); var poly = PolygonBuilderEx.CreatePolygon( PolylineBuilderEx.CreatePolyline(ellipse, AttributeFlags.AllAttributes)); var elpElm = ElementFactory.Instance.CreateGraphicElement( container, poly, ellipseSym, "New Ellipse");
//Must be on QueuedTask.Run(() => { ... List<Coordinate2D> plyCoords = new List<Coordinate2D>(); plyCoords.Add(new Coordinate2D(1, 1)); plyCoords.Add(new Coordinate2D(1.25, 2)); plyCoords.Add(new Coordinate2D(1.5, 1.1)); plyCoords.Add(new Coordinate2D(1.75, 2)); plyCoords.Add(new Coordinate2D(2, 1.1)); plyCoords.Add(new Coordinate2D(2.25, 2)); plyCoords.Add(new Coordinate2D(2.5, 1.1)); plyCoords.Add(new Coordinate2D(2.75, 2)); plyCoords.Add(new Coordinate2D(3, 1)); Polygon poly = PolygonBuilderEx.CreatePolygon(plyCoords); //Set symbolology, create and add element to layout CIMStroke outline = SymbolFactory.Instance.ConstructStroke( ColorFactory.Instance.BlackRGB, 2.0, SimpleLineStyle.Solid); CIMPolygonSymbol polySym = SymbolFactory.Instance.ConstructPolygonSymbol( ColorFactory.Instance.RedRGB, SimpleFillStyle.ForwardDiagonal, outline); ElementFactory.Instance.CreateGraphicElement( container, poly, polySym, "New Lasso");
//Create a simple 2D rectangle graphic and apply simple fill and //outline symbols. //Construct on the worker thread await QueuedTask.Run(() => { //Build 2D envelope geometry Coordinate2D rec_ll = new Coordinate2D(1.0, 4.75); Coordinate2D rec_ur = new Coordinate2D(3.0, 5.75); //At 2.x - Envelope rec_env = EnvelopeBuilder.CreateEnvelope(rec_ll, rec_ur); Envelope rec_env = EnvelopeBuilderEx.CreateEnvelope(rec_ll, rec_ur); //Set symbolology, create and add element to layout CIMStroke outline = SymbolFactory.Instance.ConstructStroke( ColorFactory.Instance.BlackRGB, 5.0, SimpleLineStyle.Solid); CIMPolygonSymbol polySym = SymbolFactory.Instance.ConstructPolygonSymbol( ColorFactory.Instance.GreenRGB, SimpleFillStyle.DiagonalCross, outline); //At 2.x - GraphicElement recElm = // LayoutElementFactory.Instance.CreateRectangleGraphicElement( // layout, rec_env, polySym); // recElm.SetName("New Rectangle"); // GraphicElement recElm = ElementFactory.Instance.CreateGraphicElement( container, rec_env, polySym, "New Rectangle"); //Or use Predefined shape GraphicElement recElm2 = ElementFactory.Instance.CreatePredefinedShapeGraphicElement( container, PredefinedShape.Rectangle, rec_env, polySym, "New Rectangle2"); });
System.Object
System.ValueType
System.Enum
ArcGIS.Desktop.Mapping.SimpleFillStyle
Target Platforms: Windows 11, Windows 10