zoukankan      html  css  js  c++  java
  • 渲染标签文字(光晕效果)

    [转载]渲染标签文字(光晕效果)

    /// <summary>
            /// 渲染标签文字
            /// </summary>
            /// <param name="geoLayer"></param>
            /// <param name="field"></param>
            public static void RenderLabel(IGeoFeatureLayer geoLayer,string field)
            {
                IMultiLayerFillSymbol marker = new MultiLayerFillSymbolClass();
                ISimpleFillSymbol fill = new SimpleFillSymbolClass();
                ISimpleLineSymbol line = new SimpleLineSymbolClass();
                line.Width = 0.5;
                line.Color = Converter.ToRGBColor(Color.White) as IColor;
                fill.Style = esriSimpleFillStyle.esriSFSSolid;
                fill.Color = Converter.ToRGBColor(Color.White);
                marker.AddLayer(fill as IFillSymbol);
                marker.Outline = line as ILineSymbol;
                ITextSymbol symbol = new TextSymbolClass();
                symbol.Size = 10;
                IMask mask = symbol as IMask;
                mask.MaskSymbol = marker as IFillSymbol;
                mask.MaskStyle = esriMaskStyle.esriMSHalo;
                mask.MaskSize = 1;

                IAnnotateLayerPropertiesCollection annoCollection = geoLayer.AnnotationProperties;
                annoCollection.Clear();
                ILabelEngineLayerProperties lblPro = new LabelEngineLayerPropertiesClass();
                lblPro.Expression = string.Format("[{0}]", field);
                lblPro.Symbol = mask as ITextSymbol;
                IAnnotateLayerProperties alp = (IAnnotateLayerProperties)lblPro;
                annoCollection.Add(alp);
                geoLayer.DisplayAnnotation = true;
            }
  • 相关阅读:
    Python包中__init__.py作用
    获取web页面xpath
    Selenium学习(Python)
    C++构造函数的选择
    分布式实时处理系统——C++高性能编程
    构建之法(邹欣)
    分布式实时处理系统——通信基础
    go语言-csp模型-并发通道
    redis.conf 配置说明
    Linux fork()一个进程内核态的变化
  • 原文地址:https://www.cnblogs.com/lauer0246/p/1190773.html
Copyright © 2011-2022 走看看