zoukankan      html  css  js  c++  java
  • arcengine 画线

    private void axMapControl1_OnMouseDown(object sender, ESRI.ArcGIS.Controls.IMapControlEvents2_OnMouseDownEvent e)
    {

    ILineElement pLineElement;

     IActiveView pActiveView;

    IRgbColor pRgbColor;

    IRubberBand pRubberBand;
    ISimpleLineSymbol pSimpleLineSymbol;
    IPolyline pPloyline;
    pActiveView = axMapControl1.ActiveView;
    pSimpleLineSymbol = new SimpleLineSymbolClass();
    pSimpleLineSymbol.Style = esriSimpleLineStyle.esriSLSSolid;
    pRgbColor = new RgbColorClass();
    pRgbColor.Red = 125;
    pSimpleLineSymbol.Color = pRgbColor;
    pRubberBand = new RubberLineClass();
    pLineElement = new LineElementClass();
    pLineElement.Symbol = pSimpleLineSymbol;
    pPloyline = pRubberBand.TrackNew(pActiveView.ScreenDisplay, pSimpleLineSymbol as ISymbol) as IPolyline;
    pElement = new LineElement();
    pElement = pLineElement as IElement;
    pElement.Geometry = pPloyline;
    IGraphicsContainer pGraphicsContainer = axMapControl1.ActiveView.FocusMap as IGraphicsContainer;
    pGraphicsContainer.AddElement(pElement, 0);
    axMapControl1.ActiveView.Refresh();

    }

  • 相关阅读:
    每日总结
    每日总结
    每日总结
    每日总结
    每日总结
    每日总结
    每日总结
    每日总结
    Java学习哈希表2
    Java学习哈希表1
  • 原文地址:https://www.cnblogs.com/jinqier/p/2525040.html
Copyright © 2011-2022 走看看