您的位置:首页 > 编程语言 > C#

C#与ArcGIS Engine生产面状图形

2013-08-21 20:14 225 查看
using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Windows.Forms;

using ESRI.ArcGIS.Carto;

using ESRI.ArcGIS.Controls;

using ESRI.ArcGIS.Display;

using ESRI.ArcGIS.Geometry;

namespace 选择元素

{

    public
partial class Form1 : Form

    {

       
public Form1()

       
{

           
InitializeComponent();

       
}

       
//定义颜色方法

       
private IRgbColor GetRGB(int r, int g, int b)

       
{

           
IRgbColor pRgbColor = new RgbColorClass();  //利用
IRgbColor 接口,分别设置R、G、B三个值参数

           
pRgbColor.Red = r;

           
pRgbColor.Green = g;

           
pRgbColor.Blue = b;

           
return pRgbColor;   //
返回对象值

       
}

       
private void axMapControl1_OnMouseDown(object sender,
ESRI.ArcGIS.Controls.IMapControlEvents2_OnMouseDownEvent e)

       
{

             
  IMap pMap;

             
  IActiveView pActiveView;

               
pMap = axMapControl1.Map;

               
pActiveView = pMap as IActiveView;

            

               
ISegmentCollection pSegColl;

               
ILine pLine;

               
IRing pRing;

               
pSegColl = new RingClass();

               
pLine = new LineClass();

               
IPoint pPt1 = new PointClass();

               
pPt1.PutCoords(100, 100);

               
IPoint pPt2 = new PointClass();

               
pPt2.PutCoords(200, 100);

               
IPoint pPt3 = new PointClass();

               
pPt3.PutCoords(200, 300);

    
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: