zoukankan      html  css  js  c++  java
  • ArcEngine实现对点、线、面的闪烁(转载)

    //闪烁线
    static void FlashLine(AxMapControl mapControl,IScreenDisplay iScreenDisplay,IGeometry iGeometry)
    {
        ISimpleLineSymbol iLineSymbol;
        ISymbol iSymbol;
        IRgbColor iRgbColor;

        iLineSymbol = new SimpleLineSymbol();
        iLineSymbol.Width = 4;
        iRgbColor = new RgbColor();
        iRgbColor.Red = 255;
        iLineSymbol.Color = iRgbColor;
        iSymbol = (ISymbol)iLineSymbol;
        iSymbol.ROP2 = esriRasterOpCode.esriROPNotXOrPen;
        mapControl.FlashShape(iGeometry, 3, 200, iSymbol);
    }

    //闪烁面
    static void FlashPolygon(AxMapControl mapControl, IScreenDisplay iScreenDisplay, IGeometry iGeometry)
    {
        ISimpleFillSymbol iFillSymbol;
        ISymbol iSymbol;
        IRgbColor iRgbColor;

        iFillSymbol = new SimpleFillSymbol();
        iFillSymbol.Style = esriSimpleFillStyle.esriSFSSolid;
        iFillSymbol.Outline.Width = 12;

        iRgbColor = new RgbColor();
        iRgbColor.RGB = System.Drawing.Color.FromArgb(100, 180, 180).ToArgb();
        iFillSymbol.Color = iRgbColor;

        iSymbol = (ISymbol)iFillSymbol;
        iSymbol.ROP2 = esriRasterOpCode.esriROPNotXOrPen;
        iScreenDisplay.SetSymbol(iSymbol);
        mapControl.FlashShape(iGeometry, 3, 200, iSymbol);
    }

    //闪烁点
    static void FlashPoint(AxMapControl mapControl, IScreenDisplay iScreenDisplay, IGeometry iGeometry)
    {
        ISimpleMarkerSymbol iMarkerSymbol;
        ISymbol iSymbol;
        IRgbColor iRgbColor;

        iMarkerSymbol = new SimpleMarkerSymbol();
        iMarkerSymbol.Style = esriSimpleMarkerStyle.esriSMSCircle;
        iRgbColor = new RgbColor();
        iRgbColor.RGB = System.Drawing.Color.FromArgb(0, 0, 0).ToArgb();
        iMarkerSymbol.Color = iRgbColor;
        iSymbol = (ISymbol)iMarkerSymbol;
        iSymbol.ROP2 = esriRasterOpCode.esriROPNotXOrPen;
        mapControl.FlashShape(iGeometry, 3, 200, iSymbol);
    }
    //闪烁目标
    public static void FlashFeature(AxMapControl mapControl,IFeature iFeature, IMap iMap)
    {
        IActiveView iActiveView = iMap as IActiveView;
        if (iActiveView != null)
        {
    iActiveView.ScreenDisplay.StartDrawing(0, (short)esriScreenCache.esriNoScreenCache);
    //根据几何类型调用不同的过程
    switch (iFeature.Shape.GeometryType)
    {
        case esriGeometryType.esriGeometryPolyline:
    FlashLine(mapControl, iActiveView.ScreenDisplay, iFeature.Shape);
    break;
        case esriGeometryType.esriGeometryPolygon:
    FlashPolygon(mapControl, iActiveView.ScreenDisplay, iFeature.Shape);
    break;
        case esriGeometryType.esriGeometryPoint:
    FlashPoint(mapControl, iActiveView.ScreenDisplay, iFeature.Shape);
    break;
        default:
    break;
    }
    iActiveView.ScreenDisplay.FinishDrawing();
        }
    }

  • 相关阅读:
    WebXml.com.cn 中国股票行情数据 WEB 服务(支持深圳和上海股市的全部基金、债券和股票),数据即时更新
    新浪股票接口AndroidSDK
    Java Applet使用
    Java反射机制
    Java中HashMap排序
    C#委托和事件
    Java操作XML
    迭代器模式
    C# 天气预报
    ptypes中string类的空间分配
  • 原文地址:https://www.cnblogs.com/bobzhangfw/p/1172572.html
Copyright © 2011-2022 走看看