zoukankan      html  css  js  c++  java
  • ArcGIS Engine 中 线加箭头

            void AddArrowElement(IGeometry pGeometry, IActiveView pActiveView)
            {
                IRgbColor pColor = new RgbColorClass();
                pColor.Red = 255;

                ICartographicLineSymbol pCartoLineSymbol = new CartographicLineSymbolClass();
                pCartoLineSymbol.Cap = esriLineCapStyle.esriLCSRound;

                ILineProperties pLineProp = pCartoLineSymbol as ILineProperties;
                pLineProp.DecorationOnTop = true;

                ILineDecoration pLineDecoration = new LineDecorationClass();
                ISimpleLineDecorationElement pSimpleLineDecoElem = new SimpleLineDecorationElementClass();
                pSimpleLineDecoElem.AddPosition(1);
                IArrowMarkerSymbol pArrowMarkerSym = new ArrowMarkerSymbolClass();
                pArrowMarkerSym.Size = 8;
                pArrowMarkerSym.Color = pColor;
                pSimpleLineDecoElem.MarkerSymbol = pArrowMarkerSym as IMarkerSymbol;
                pLineDecoration.AddElement(pSimpleLineDecoElem as ILineDecorationElement);
                pLineProp.LineDecoration = pLineDecoration;

                ILineSymbol pLineSymbol = pCartoLineSymbol as ILineSymbol;

                pLineSymbol.Color = pColor;
                pLineSymbol.Width = 1;

                ILineElement pLineElem = new LineElementClass();
                pLineElem.Symbol = pLineSymbol;
                IElement pElem = pLineElem as IElement;
                pElem.Geometry = pGeometry;

                IGraphicsContainer pGraphicsContainer = mCtrl.Map as IGraphicsContainer;
                pGraphicsContainer.AddElement(pElem, 0);

                mCtrl.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGraphics, nullnull);
            }
  • 相关阅读:
    STL中关于map和set的四个问题?
    PHP之Zip扩展,解压缩文件,ZipArchive类
    PHP之音乐ID3扩展
    关于PHP执行超时的问题
    PHP中GD库安装
    PHP之输出控制 ob_start(),ob_get_contents(),ob_end_clean()
    PHP之xdebug详解
    PHP上传文件详解
    php使用Header函数,PHP_AUTH_PW和PHP_AUTH_USER做用户验证及缺点
    深入研究php://input与php://output
  • 原文地址:https://www.cnblogs.com/94cool/p/4363224.html
Copyright © 2011-2022 走看看