zoukankan      html  css  js  c++  java
  • arcengine 画多边形

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

    IRgbColor pRgbColor;
    IActiveView pActiveView;
    IRubberBand pRubberBand;
    IElement pElement;
    IGraphicsContainer pGraphicsContainer;//起到容器的作用,可使画的内容不消失

    IPolygonElement pPolygonElement;
    ISimpleFillSymbol pSimpleFillSymbol;
    IPolygon pPolygon;

    pActiveView = axMapControl1.ActiveView;
    pSimpleFillSymbol = new SimpleFillSymbolClass();
    pSimpleFillSymbol.Style = esriSimpleFillStyle.esriSFSBackwardDiagonal;//面的样式
    pRgbColor = new RgbColorClass();
    pRgbColor.Red = 250;
    pSimpleFillSymbol.Color = pRgbColor;
    pRubberBand = new RubberPolygonClass();
    pPolygonElement = new PolygonElementClass();
    pPolygon = pRubberBand.TrackNew(pActiveView.ScreenDisplay, pSimpleFillSymbol as ISymbol) as IPolygon;
    pElement = new PolygonElement();
    pElement = pPolygonElement as IElement;
    pElement.Geometry = pPolygon;
    pGraphicsContainer = axMapControl1.ActiveView.FocusMap as IGraphicsContainer;
    pGraphicsContainer.AddElement(pElement, 0);
    axMapControl1.ActiveView.Refresh();

    }


    作者:jinqier
    出处:http://www.cnblogs.com/jinqier/
    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

  • 相关阅读:
    Linux shell(3)
    Linux shell 编写(2)
    Linux shell 编写(1)
    团队冲刺(一)
    峦码团队任务表
    电梯演讲&界面展示说明
    第一次小组会议——NABCD讨论
    开发项目&团队介绍
    Linux中查看各文件夹大小命令:du -h --max-depth=1
    shell脚本[] [[]] -n -z 的含义解析
  • 原文地址:https://www.cnblogs.com/jinqier/p/2525081.html
Copyright © 2011-2022 走看看