EllipticArcBuilderEx Constructor(MapPoint,MapPoint,Coordinate2D,ArcOrientation,SpatialReference)
Creates a new instance of the EllipticArcBuilderEx class.
The new instance will be a circular arc from end points and the center point.
Parameters
- startPt
- The point from which the arc starts.
- endPt
- The point to which the arc ends.
- centerPt
- The center point of the embedded circle.
- orientation
- The orientation of the arc, clockwise or counterclockwise.
- spatialReference
- (Optional) The spatial reference of the arc. The default value is null. The spatial references of the start and end points are ignored.
Construct a Circular Arc - using a center point and orientation
// Construct a circular arc from (2, 1) to (1, 2)
// with center point at (1, 1) and orientation counterclockwise.
// Use a builderEx convenience method or use a builderEx constructor.
MapPoint toPt = MapPointBuilderEx.CreateMapPoint(1, 2);
MapPoint fromPt = MapPointBuilderEx.CreateMapPoint(2, 1);
Coordinate2D centerPtCoord = new Coordinate2D(1, 1);
// BuilderEx convenience methods don't need to run on the MCT.
EllipticArcSegment circularArc = EllipticArcBuilderEx.CreateCircularArc(fromPt, toPt, centerPtCoord, ArcOrientation.ArcCounterClockwise);
// BuilderEx constructors need to run on the MCT.
EllipticArcBuilderEx cab = new EllipticArcBuilderEx(fromPt, toPt, centerPtCoord, ArcOrientation.ArcCounterClockwise);
EllipticArcSegment otherCircularArc = cab.ToSegment();
Create Circle Text Element
//Must be on QueuedTask.Run(() => { ...
//Build geometry
Coordinate2D center = new Coordinate2D(4.5, 4);
var eabCir = new EllipticArcBuilderEx(center, 0.5, ArcOrientation.ArcClockwise);
var cir = eabCir.ToSegment();
var poly = PolygonBuilderEx.CreatePolygon(
PolylineBuilderEx.CreatePolyline(cir, AttributeFlags.AllAttributes));
//Set symbolology, create and add element to layout
CIMTextSymbol sym = SymbolFactory.Instance.ConstructTextSymbol(
ColorFactory.Instance.GreenRGB, 10, "Arial", "Regular");
string text = "Circle, circle, circle";
GraphicElement cirTxtElm = ElementFactory.Instance.CreateTextGraphicElement(
container, TextType.CircleParagraph, poly, sym, text, "New Circle Text", false);
Target Platforms: Windows 11, Windows 10
ArcGIS Pro version: 3 or higher.