新手请教 画短横线

问题描述

ISimpleLineSymbolsimpleLineSymbol=newSimpleLineSymbolClass();simpleLineSymbol.Style=esriSimpleLineStyle.esriSLSDash;//线的形式,此为短横线(此处无效)IPolylinepolyline=newPolylineClass();IPointpoint=newPointClass();point.PutCoords(1,1);polyline.FromPoint=point;//起点point.PutCoords(10,1);polyline.ToPoint=point;//终点simpleLineSymbol.Width=2;//线宽IRgbColorrgbColor=getRGB(255,0,0);simpleLineSymbol.Color=rgbColor;//颜色ISymbolsymbol=simpleLineSymbolasISymbol;symbol.ROP2=esriRasterOpCode.esriROPNotXOrPen;IActiveViewactiveView=this.axMapControl1.ActiveView;activeView.ScreenDisplay.StartDrawing(activeView.ScreenDisplay.hDC,(short)esriScreenCache.esriNoScreenCache);activeView.ScreenDisplay.SetSymbol(symbol);activeView.ScreenDisplay.DrawPolyline(polylineasIGeometry);activeView.ScreenDisplay.FinishDrawing();activeView.ScreenDisplay.FinishDrawing();simpleLineSymbol.Style=esriSimpleLineStyle.esriSLSDash一句即便换成DashDot、DashDotDot也不能实现

解决方案

解决方案二:
场景说清楚,似乎不是标准的绘图

时间: 2016-08-11