EllipticArcBuilderEx Constructor(Coordinate2D,Double,Double,Double,ArcOrientation,SpatialReference)
Creates a new instance of the EllipticArcBuilderEx class.
The new instance will be an ellipse.
Construct an Ellipse
// Construct an ellipse centered at (1, 2) with rotationAngle = -pi/6,
// semiMajorAxis = 5, minorMajorRatio = 0.2, oriented clockwise.
// Use a builderEx convenience method or use a builderEx constructor.
Coordinate2D centerPt = new Coordinate2D(1, 2);
// BuilderEx convenience methods don't need to run on the MCT.
EllipticArcSegment ellipse = EllipticArcBuilderEx.CreateEllipse(centerPt, -1 * Math.PI / 6, 5, 0.2, ArcOrientation.ArcClockwise);
// BuilderEx constructors need to run on the MCT.
EllipticArcBuilderEx builder = new EllipticArcBuilderEx(centerPt, -1 * Math.PI / 6, 5, 0.2, ArcOrientation.ArcClockwise);
EllipticArcSegment anotherEllipse = builder.ToSegment();
Create Ellipse Text Element
//Must be on QueuedTask.Run(() => { ...
//Build geometry
Coordinate2D center = new Coordinate2D(4.5, 2.75);
var eabElp = new EllipticArcBuilderEx(center, 0, 1, 0.45, ArcOrientation.ArcClockwise);
var ellipse = eabElp.ToSegment();
var poly = PolygonBuilderEx.CreatePolygon(
PolylineBuilderEx.CreatePolyline(ellipse, AttributeFlags.AllAttributes));
//Set symbolology, create and add element to layout
CIMTextSymbol sym = SymbolFactory.Instance.ConstructTextSymbol(
ColorFactory.Instance.BlueRGB, 10, "Arial", "Regular");
string text = "Ellipse, ellipse, ellipse";
GraphicElement ge = ElementFactory.Instance.CreateTextGraphicElement(
container, TextType.PolygonParagraph, poly, sym, text, "New Ellipse Text", false);
Target Platforms: Windows 11, Windows 10, Windows 8.1
ArcGIS Pro version: 3.0 or higher.