ArcEngine中画点画线画面
畫點(diǎn)
IPoint pt; pt = axMapControl1.ToMapPoint(e.x, e.y); IMarkerElement pMarkerElement; pMarkerElement = new MarkerElementClass(); IElement pElement; pElement = pMarkerElement as IElement; pElement.Geometry = pt; pGraphicsContainer = pMap as IGraphicsContainer; pGraphicsContainer.AddElement((IElement)pMarkerElement, 0); pActiveView.Refresh();
畫線
IGeometry polyline; polyline = axMapControl1.TrackLine(); ILineElement pLineElement; pLineElement = new LineElementClass(); IElement pElement; pElement = pLineElement as IElement; pElement.Geometry = polyline; pGraphicsContainer = pMap as IGraphicsContainer; pGraphicsContainer.AddElement((IElement)pLineElement, 0); pActiveView.Refresh();
畫面
IGeometry Polygon; Polygon = axMapControl1.TrackPolygon(); IPolygonElement PolygonElement; PolygonElement = new PolygonElementClass(); IElement pElement; pElement = PolygonElement as IElement; pElement.Geometry = Polygon; pGraphicsContainer = pMap as IGraphicsContainer; pGraphicsContainer.AddElement((IElement)PolygonElement, 0); pActiveView.Refresh();
轉(zhuǎn)載于:https://www.cnblogs.com/cuiguanghe/archive/2013/03/10/2952500.html
總結(jié)
以上是生活随笔為你收集整理的ArcEngine中画点画线画面的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: Java中创建对象的四种方式
- 下一篇: 实用代码-C#之IP地址和整数的互转