画圆并将圆(线)转换成区域
// 定义圆的中心点
IPoint point = new PointClass();
point.X = 119.302302426605;
point.Y = 26.0989696929962;
// 半径
double radius = 0.001;
// 圆构造器
ICircularArc circularArc = new CircularArcClass();
IConstructCircularArc constructCircularArc = circularArc as IConstructCircularArc;
// 开始画圆
constructCircularArc.ConstructCircle(point, radius, true);
// 线集合 将集合实例化为闭合线的对象
ISegmentCollection pPolyline;
pPolyline = new RingClass();
object Missing1 = Type.Missing;
object Missing2 = Type.Missing;
// 将圆(线)添加到线集合
pPolyline.AddSegment(circularArc as ISegment, ref Missing1, ref Missing2);
IRing pRing = pPolyline as IRing;
// 将线集合闭合
pRing.Close();
IGeometryCollection pPolygon;
pPolygon = new PolygonClass();
// 将闭合后的线转换为区域
pPolygon.AddGeometry(pRing, ref Missing1, ref Missing2);