• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# SimpleFillSymbolClass类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中SimpleFillSymbolClass的典型用法代码示例。如果您正苦于以下问题:C# SimpleFillSymbolClass类的具体用法?C# SimpleFillSymbolClass怎么用?C# SimpleFillSymbolClass使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SimpleFillSymbolClass类属于命名空间,在下文中一共展示了SimpleFillSymbolClass类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: createSimpleFillSymbol

        /// <summary>
        /// 简单渲染
        /// </summary>
        /// <param name="layerName">图层名字</param>
        /// <param name="FillStyle">FillStyle</param>
        /// <param name="pColor">FillColor</param>
        /// <param name="OutLineColor">OutLineColor</param>
        /// <param name="RenderLabel">样式名称注释</param>
        /// <param name="Descripition">描述</param>
        public void createSimpleFillSymbol(string layerName, esriSimpleFillStyle FillStyle, IColor pColor, IColor OutLineColor, string RenderLabel, string Descripition)
        {
            //简单填充符号
            ISimpleFillSymbol simpleFillSymbol = new SimpleFillSymbolClass();
            //可以用符号选择器进行
            simpleFillSymbol.Style = FillStyle;
            simpleFillSymbol.Color = pColor;
            //创建边线符号
            ISimpleLineSymbol simpleLineSymbol = new SimpleLineSymbolClass();
            simpleLineSymbol.Style = esriSimpleLineStyle.esriSLSSolid;
            simpleLineSymbol.Color = OutLineColor;
            ISymbol symbol = simpleLineSymbol as ISymbol;
            symbol.ROP2 = esriRasterOpCode.esriROPNotXOrPen;
            simpleFillSymbol.Outline = simpleLineSymbol;

            ISimpleRenderer simpleRender = new SimpleRendererClass();
            simpleRender.Symbol = simpleFillSymbol as ISymbol;
            simpleRender.Label = RenderLabel;
            simpleRender.Description = Descripition;

            IGeoFeatureLayer geoFeatureLayer;
            geoFeatureLayer = getGeoLayer(layerName);
            if (geoFeatureLayer != null)
            {
                geoFeatureLayer.Renderer = simpleRender as IFeatureRenderer;
            }
        }
开发者ID:gistop,项目名称:aegis,代码行数:36,代码来源:Thematicmap.cs


示例2: okButton_Click

        // Save config and exit.
        private void okButton_Click(object sender, EventArgs e)
        {
            try
            {
                ISimpleFillSymbol selectionSymbol = new SimpleFillSymbolClass();
                selectionSymbol.Color = selFillColorPaletteButton.Color;
                selectionSymbol.Color.Transparency = Convert.ToByte(255 - Convert.ToDouble(selTranNumericUpDown.Value) * 2.55);
                ISimpleLineSymbol selectionOutlineSymbol = new SimpleLineSymbolClass();
                selectionOutlineSymbol.Color = selOutlineColorPaletteButton.Color;
                selectionOutlineSymbol.Width = Convert.ToDouble(selOutlineWidthNumericUpDown.Value);
                selectionSymbol.Outline = selectionOutlineSymbol;
                Config.SelectionSmbol = selectionSymbol;

                ISimpleFillSymbol editSymbol = new SimpleFillSymbolClass();
                editSymbol.Color = editFillColorColorPaletteButton.Color;
                editSymbol.Color.Transparency = Convert.ToByte(255 - Convert.ToDouble(editTranNumericUpDown.Value) * 2.55);
                ISimpleLineSymbol editOutlineSymbol = new SimpleLineSymbolClass();
                editOutlineSymbol.Color = editOutlineColorPaletteButton.Color;
                editOutlineSymbol.Width = Convert.ToDouble(editOutlineWidthNumericUpDown.Value);
                editSymbol.Outline = editOutlineSymbol;
                Config.EditSymbol = editSymbol;
                Config.CustormEditColor = editCustomCheckBox.Checked;

                Config.Save();
                Editor.Refresh();
                Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(string.Format("Unfortunately, the application meets an error.\n\nSource: {0}\nSite: {1}\nMessage: {2}", ex.Source, ex.TargetSite, ex.Message), "Error");
            }
        }
开发者ID:nazzal88,项目名称:ares,代码行数:33,代码来源:OptionForm.cs


示例3: ClassifyRenderer

        public static IRasterRenderer ClassifyRenderer(IRasterLayer raslyr,IRgbColor start_clr,IRgbColor end_clr,int count)
        {
            IRasterClassifyColorRampRenderer pRClassRend = new RasterClassifyColorRampRendererClass();
            IRasterRenderer rasterRenderer = pRClassRend as IRasterRenderer;

            IRaster pRaster = raslyr.Raster;
            IRasterBandCollection pRBandCol = pRaster as IRasterBandCollection;
            IRasterBand pRBand = pRBandCol.Item(0);
            if (pRBand.Histogram == null)
            {
                pRBand.ComputeStatsAndHist();
            }
            rasterRenderer.Raster = pRaster;
            pRClassRend.ClassCount = count;
            rasterRenderer.Update();

            IAlgorithmicColorRamp colorRamp = new AlgorithmicColorRampClass();
            colorRamp.Size = count;
            colorRamp.FromColor = start_clr;
            colorRamp.ToColor = end_clr;
            bool createColorRamp;
            colorRamp.CreateRamp(out createColorRamp);

            IFillSymbol fillSymbol = new SimpleFillSymbolClass();
            for (int i = 0; i < pRClassRend.ClassCount; i++)
            {
                fillSymbol.Color = colorRamp.get_Color(i);
                pRClassRend.set_Symbol(i, fillSymbol as ISymbol);
                pRClassRend.set_Label(i, pRClassRend.get_Break(i).ToString("0.00"));
            }
            return rasterRenderer;
        }
开发者ID:niwho,项目名称:ArcGISFundation,代码行数:32,代码来源:LayerHelper.cs


示例4: button1_Click

 //简单渲染专题图
 private void button1_Click(object sender, EventArgs e)
 {
     //简单填充符号
     ISimpleFillSymbol simpleFillSymbol = new SimpleFillSymbolClass();
     simpleFillSymbol.Style = esriSimpleFillStyle.esriSFSDiagonalCross;
     simpleFillSymbol.Color = getRGB(255, 0, 0);
     //创建边线符号
     ISimpleLineSymbol simpleLineSymbol = new SimpleLineSymbolClass();
     simpleLineSymbol.Style = esriSimpleLineStyle.esriSLSDashDotDot;
     simpleLineSymbol.Color = getRGB(0, 255, 0);
     ISymbol symbol = simpleLineSymbol as ISymbol;
     symbol.ROP2 = esriRasterOpCode.esriROPNotXOrPen;
     simpleFillSymbol.Outline = simpleLineSymbol;
     ISimpleRenderer simpleRender = new SimpleRendererClass();
     simpleRender.Symbol = simpleFillSymbol as ISymbol;
     simpleRender.Label = "NAME";
     simpleRender.Description = "东丰县行政区域";
     IGeoFeatureLayer geoFeatureLayer;
     geoFeatureLayer = getGeoLayer("东丰县行政区域");
     if (geoFeatureLayer != null)
     {
         geoFeatureLayer.Renderer = simpleRender as IFeatureRenderer;
     }
     this.axMapControl1.Refresh();
 }
开发者ID:AgentWord,项目名称:SiPing,代码行数:26,代码来源:mapphoto.cs


示例5: get_SimplePolygonSymbol

 public static ISimpleFillSymbol get_SimplePolygonSymbol(IColor color, esriSimpleFillStyle style, ILineSymbol outline)
 {
     ISimpleFillSymbol theReturn = new SimpleFillSymbolClass();
     theReturn.Color = color;
     theReturn.Style = style;
     theReturn.Outline = outline;
     return theReturn;
 }
开发者ID:EAWCS1,项目名称:SUITT,代码行数:8,代码来源:GraphicsHelper.cs


示例6: CreateFillSymbol

 public static IFillSymbol CreateFillSymbol(Color fillColor, esriSimpleFillStyle eFillStyle, ISimpleLineSymbol aOutline)
 {
     SimpleFillSymbolClass class2 = new SimpleFillSymbolClass();
     class2.Style = eFillStyle;
     class2.Color = ColorHelper.CreateColor(fillColor);
     class2.Outline = aOutline;
     return class2;
 }
开发者ID:ismethr,项目名称:gas-geological-map,代码行数:8,代码来源:SymbolHelper.cs


示例7: CreateSimpleFillSymbol

 private static ISimpleFillSymbol CreateSimpleFillSymbol(int red, int green, int blue)
 {
     ISimpleFillSymbol sfs = new SimpleFillSymbolClass();
     IRgbColor color = new RgbColorClass();
     color.Red = red;
     color.Green = green;
     color.Blue = blue;
     sfs.Color = color;
     return sfs;
 }
开发者ID:BGCX261,项目名称:ziggis-svn-to-git,代码行数:10,代码来源:Utilities.cs


示例8: GetPaintSymbol

        /// <summary>
        /// Get the paint symble of painted pixel.
        /// </summary>
        /// <param name="filledColor">Fill color for the symbol</param>
        /// <returns></returns>
        public static ISimpleFillSymbol GetPaintSymbol(IColor filledColor)
        {
            ISimpleFillSymbol selectionSymbol = new SimpleFillSymbolClass();
            selectionSymbol.Color = filledColor;
            ISimpleLineSymbol selectionOutlineSymbol = new SimpleLineSymbolClass();
            selectionOutlineSymbol.Color = new RgbColorClass() { Red = 255, Green = 255, Blue = 0 };
            selectionOutlineSymbol.Width = 2;
            selectionSymbol.Outline = selectionOutlineSymbol;

            return selectionSymbol;
        }
开发者ID:nazzal88,项目名称:ares,代码行数:16,代码来源:Painter.cs


示例9: ProPortialRender

        public ProPortialRender(AxMapControl pMapcontrol, IFeatureLayer pFtLayer,  string pFieldName)
        {
            IGeoFeatureLayer pGeo = pFtLayer as IGeoFeatureLayer;

            IProportionalSymbolRenderer pProRender = new ProportionalSymbolRendererClass();

            pProRender.Field = pFieldName;

            pProRender.ValueUnit = esriUnits.esriUnknownUnits;

            ISimpleMarkerSymbol pMarkerSymbol = new SimpleMarkerSymbolClass();

            pMarkerSymbol.Style = esriSimpleMarkerStyle.esriSMSCircle;

            pMarkerSymbol.Size = 2;

            pMarkerSymbol.Color = GetRGBColor(255, 0, 0);

            pProRender.MinSymbol = pMarkerSymbol as ISymbol;

            IDataStatistics pDataStat = new DataStatisticsClass();

            IFeatureCursor pFtCursor = pFtLayer.FeatureClass.Search(null, false);

            pDataStat.Cursor = pFtCursor as ICursor;

            pDataStat.Field = pFieldName;

            pProRender.MinDataValue = pDataStat.Statistics.Minimum;

            pProRender.MaxDataValue = pDataStat.Statistics.Maximum;

            IFillSymbol pFillS = new SimpleFillSymbolClass();

            pFillS.Color = GetRGBColor(239, 228, 190);

            ILineSymbol pLineS = new SimpleLineSymbolClass();

            pLineS.Width = 2;

            pFillS.Outline = pLineS;

            ISimpleFillSymbol pSFillS = pFillS as ISimpleFillSymbol;

            pSFillS.Color = GetRGBColor(100, 100, 253);

            pProRender.BackgroundSymbol = pFillS;

            pGeo.Renderer = pProRender as IFeatureRenderer;

            pMapcontrol.ActiveView.Refresh();
        }
开发者ID:esrichina,项目名称:Engine10DevApplication,代码行数:52,代码来源:ProPortialRender.cs


示例10: ConstructMultiPatchElement

        public static IElement ConstructMultiPatchElement(IGeometry geometry, IColor color)
        {
            ISimpleFillSymbol simpleFillSymbol = new SimpleFillSymbolClass();
            simpleFillSymbol.Color = color;

            IElement element = new MultiPatchElementClass();
            element.Geometry = geometry;

            IFillShapeElement fillShapeElement = element as IFillShapeElement;
            fillShapeElement.Symbol = simpleFillSymbol;

            return element;
        }
开发者ID:Esri,项目名称:arcobjects-sdk-community-samples,代码行数:13,代码来源:ElementUtilities.cs


示例11: SetLayerColor

        public static void SetLayerColor(IGeoFeatureLayer geolyr, int r, int g, int b)
        {
            //ILineSymbol pLineSymbol = new SimpleLineSymbolClass();
            //pLineSymbol.Color = CvtRGB(r, g, b);

            ISimpleFillSymbol pFillSymbol = new SimpleFillSymbolClass();
            pFillSymbol.Color = CvtRGB(r, g, b);
            //pFillSymbol.Outline = pLineSymbol;

            ISimpleRenderer pSimpleRenderer;
            pSimpleRenderer = new SimpleRendererClass();
            pSimpleRenderer.Symbol = (ISymbol)pFillSymbol;
            geolyr.Renderer = pSimpleRenderer as IFeatureRenderer;
        }
开发者ID:niwho,项目名称:ArcGISFundation,代码行数:14,代码来源:LayerHelper.cs


示例12: MainForm_Load

        private void MainForm_Load(object sender, EventArgs e)
        {        
            m_mapControl = (IMapControl3) axMapControl1.Object;

            //relative file path to the sample data from EXE location
            string filePath = @"..\..\..\data\USAMajorHighways";
 
            //Add Lakes layer
            IWorkspaceFactory workspaceFactory = new ShapefileWorkspaceFactoryClass();
            IFeatureWorkspace workspace = (IFeatureWorkspace)workspaceFactory.OpenFromFile(filePath, axMapControl1.hWnd);
            IFeatureLayer featureLayer = new FeatureLayerClass();
            featureLayer.Name = "Lakes";
            featureLayer.Visible = true;
            featureLayer.FeatureClass = workspace.OpenFeatureClass("us_lakes");

            #region create a SimplerRenderer
            IRgbColor color = new RgbColorClass();
            color.Red = 190;
            color.Green = 232;
            color.Blue = 255;

            ISimpleFillSymbol sym = new SimpleFillSymbolClass();
            sym.Color = color;

            ISimpleRenderer renderer = new SimpleRendererClass();
            renderer.Symbol = sym as ISymbol;
            #endregion

            ((IGeoFeatureLayer)featureLayer).Renderer = renderer as IFeatureRenderer;
            axMapControl1.Map.AddLayer((ILayer)featureLayer);

            //Add Highways layer
            featureLayer = new FeatureLayerClass();
            featureLayer.Name = "Highways";
            featureLayer.Visible = true;
            featureLayer.FeatureClass = workspace.OpenFeatureClass("usa_major_highways");
            axMapControl1.Map.AddLayer((ILayer)featureLayer);

            //******** Important *************
            //store a reference to this form (Mainform) using the EditHelper class
            EditHelper.TheMainForm = this;
            EditHelper.IsEditorFormOpen = false;

            //add the EditCmd command to the toolbar
            axEditorToolbar.AddItem("esriControls.ControlsOpenDocCommand", 0, -1, false, 0, esriCommandStyles.esriCommandStyleIconOnly);
            axEditorToolbar.AddItem("esriControls.ControlsSaveAsDocCommand", 0, -1, false, 0, esriCommandStyles.esriCommandStyleIconOnly);
            axEditorToolbar.AddItem("esriControls.ControlsAddDataCommand", 0, -1, false, 0, esriCommandStyles.esriCommandStyleIconOnly);
            axEditorToolbar.AddItem(new EditCmd(), 0, -1, false, 0, esriCommandStyles.esriCommandStyleIconOnly);
             
        }
开发者ID:Esri,项目名称:arcobjects-sdk-community-samples,代码行数:50,代码来源:MainForm.cs


示例13: SimpleRender

        public SimpleRender(AxMapControl pMapcontrol, IFeatureLayer pFtLayer, String Field)
        {
            IGeoFeatureLayer pGeolayer;

            IActiveView pActiveView;

            pGeolayer = pFtLayer as IGeoFeatureLayer;

            pActiveView = pMapcontrol.ActiveView;

            IFillSymbol pFillSymbol;

            ILineSymbol pLineSymbol;

            pFillSymbol = new SimpleFillSymbolClass();

            pFillSymbol.Color = GetRGBColor(220, 110, 200);

            pLineSymbol = new SimpleLineSymbolClass();

            pLineSymbol.Color = GetRGBColor(255, 120, 105);

            pLineSymbol.Width = 2;

            pFillSymbol.Outline = pLineSymbol;

            ISimpleRenderer pSimpleRender;//��ʲô������Ⱦ

            pSimpleRender = new SimpleRendererClass();

            pSimpleRender.Symbol = pFillSymbol as ISymbol ;

            pSimpleRender.Description = "China";

            pSimpleRender.Label = "SimpleRender";

            ITransparencyRenderer pTrans;

            pTrans = pSimpleRender as ITransparencyRenderer;

            pTrans.TransparencyField = Field;

            pGeolayer.Renderer = pTrans as IFeatureRenderer;

            pActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeography, null, null);

            //����ͼ�����Ⱦ������һ��Ҫ����Ⱦ��� 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# SimpleJsonSerializer类代码示例发布时间:2022-05-24
下一篇:
C# SimpleExpression类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap