private void DrawCircle() { //清空当前显示内容 axMxDrawX1.NewFile(); //把颜色改回黑白色 axMxDrawX1.DrawCADColorIndex = 0; //把线型改成实线 axMxDrawX1.LineType = "" ; //设置线宽 4 axMxDrawX1.LineWidth = 0; //创建一个图层,名为"CircleLayer" axMxDrawX1.AddLayer( "CircleLayer" ); //设置当前图层为"CircleLayer" axMxDrawX1.LayerName = "CircleLayer" ; //《---------------------------------------》 //绘制一个实线黑色的圆 axMxDrawX1.DrawCircle(0, 800, 70); //《---------------------------------------》 //绘制一个带颜色的圆 axMxDrawX1.AddLinetype( "CircleLineType" , "" ); //设计当前线型为"CircleLineType" axMxDrawX1.LineType = ( "CircleLineType" ); axMxDrawX1.DrawCADColor = 255; axMxDrawX1.DrawCircle(200, 800, 70); //《---------------------------------------》 //绘制一个虚线线的圆 axMxDrawX1.AddLinetype( "CircleLineType" , "30,-5,7,-7" ); //设计当前线型为"CircleLineType" axMxDrawX1.LineType = ( "CircleLineType" ); axMxDrawX1.DrawCADColor = 255; axMxDrawX1.DrawCircle(400, 800, 70); //《---------------------------------------》 //绘制一个带有宽度的圆 axMxDrawX1.AddLinetype( "CircleLineType" , "30,-5,7,-7" ); //设计当前线型为"CircleLineType" axMxDrawX1.LineType = ( "CircleLineType" ); axMxDrawX1.LineWidth = 40; axMxDrawX1.DrawCADColor = 255; axMxDrawX1.DrawCircle(600, 800, 70); //把所有的实体都放到当前显示视区 axMxDrawX1.ZoomAll(); //更新视区显示 axMxDrawX1.UpdateDisplay(); } |