ArcEngine渲染面图层

 /// <summary>
        /// 简单渲染面图层
        /// </summary>
        /// <param name="IN_Layer">要渲染的面图层</param>
        /// <param name="IN_BoundaryColor">轮廓颜色</param>
        /// <param name="IN_FillColor">填充颜色</param>
        /// <param name="IN_BoundaryWidth">轮廓宽度</param>
        private void PRV_LayerRender(IGeoFeatureLayer IN_Layer,IRgbColor IN_BoundaryColor,IRgbColor IN_FillColor,int IN_BoundaryWidth)
        {
            //面渲染
            ISimpleRenderer Temp_render = new SimpleRendererClass();
            ISimpleFillSymbol Temp_FillSymbol = new SimpleFillSymbolClass();
            //轮廓颜色与宽度
            if (IN_BoundaryColor == null)
            {
                //默认为黑色
                IN_BoundaryColor = new RgbColorClass();
                IN_BoundaryColor.Red = 0;
                IN_BoundaryColor.Blue = 0;
                IN_BoundaryColor.Green = 0;
            }
            ILineSymbol Temp_BandaryLine = new SimpleLineSymbolClass();
            Temp_BandaryLine.Width = IN_BoundaryWidth;
            Temp_BandaryLine.Color = IN_BoundaryColor;
            //填充颜色
            IColor Temp_FillColor = new RgbColorClass();
            if (IN_FillColor == null)
                Temp_FillColor.NullColor = true;
            else
                Temp_FillColor = IN_FillColor;
            //设定参数
            Temp_FillSymbol.Color = Temp_FillColor;
            Temp_FillSymbol.Outline = Temp_BandaryLine;
            Temp_render.Symbol = Temp_FillSymbol as ISymbol;
            IN_Layer.Renderer = Temp_render as IFeatureRenderer;
        }

你可能感兴趣的:(arcgis,ArcEngine,ArcgisEngine,ae)