码迷,mamicode.com
首页 > 其他好文 > 详细

AE中OnAfterDraw函数中绘制点线面的相关代码

时间:2015-04-09 17:04:34      阅读:194      评论:0      收藏:0      [点我收藏+]

标签:

需要提前得到一个IActiveview类型的变量activeView

1、点绘制代码 其中getoffDrawList装载的是IFeature类型的点要素

 1             if (getoffDrawList != null && getoffDrawList.Count > 0 )
 2             {
 3                 IRgbColor getOnOffPtcolor = new RgbColorClass();
 4                 getOnOffPtcolor.Red = 0;
 5                 getOnOffPtcolor.Green = 0;
 6                 getOnOffPtcolor.Blue = 255;
 7                
 8                 ISimpleMarkerSymbol simpleMarkerSym = new SimpleMarkerSymbolClass();
 9                 simpleMarkerSym.Size = 4;
10                 simpleMarkerSym.Color = getOnOffPtcolor as IColor;
11                 activeView.ScreenDisplay.SetSymbol(simpleMarkerSym as ISymbol);
12                 foreach (IFeature getoffFea in getoffDrawList)
13                 {
14                     activeView.ScreenDisplay.DrawPoint(getoffFea.Shape as IPoint);
15                 }               
16             }

2、点绘制代码

 1              if (emptyPathStrDrawList != null && emptyPathStrDrawList.Count > 0)
 2              {
 3                  IRgbColor emptyPathColor = new RgbColorClass();
 4                  emptyPathColor.Red = 255;
 5                  emptyPathColor.Green = 0;
 6                  emptyPathColor.Blue = 0;
 7 
 8                  ISimpleLineSymbol simpleLineSym = new SimpleLineSymbolClass();
 9                  simpleLineSym.Color = emptyPathColor as IColor;
10                  simpleLineSym.Width = 3;               
11  
12                  activeView.ScreenDisplay.SetSymbol(simpleLineSym as ISymbol);
13                  
14                  for (int i = 0; i < emptyPathStrDrawList.Count; i++)
15                  {    
16                     IPolyline emptyLine = emptyPathStrDrawList[i].emptyPathLine;
17                     activeView.ScreenDisplay.DrawPolyline(emptyLine);  
18                  }
19              }

3、面绘制代码

 1             if (drawPolygonList != null && drawPolygonList.Count > 0)
 2             {
 3                 IRgbColor color = new RgbColorClass();
 4                 color.Red = 255;
 5                 color.Green = 0;
 6                 color.Blue = 0;
 7 
 8                 ISimpleLineSymbol lineSymbol = new SimpleLineSymbolClass();
 9                 lineSymbol.Style = esriSimpleLineStyle.esriSLSSolid;
10                 lineSymbol.Width = 1.0;
11                 lineSymbol.Color = color;
12 
13                 ISimpleFillSymbol m_fillSymbol = new SimpleFillSymbolClass();
14                 m_fillSymbol.Color = color;
15                 m_fillSymbol.Style = esriSimpleFillStyle.esriSFSNull;//.esriSFSNull空心多边形//.esriSFSSolid实心多边形
16                 m_fillSymbol.Outline = (ILineSymbol)lineSymbol;
17 
18                 activeView.ScreenDisplay.SetSymbol(m_fillSymbol as ISymbol);
19 
20                 foreach (IPolygon polygon in drawPolygonList)
21                 {
22                     activeView.ScreenDisplay.DrawPolygon(polygon);
23                 }
24             }

 

AE中OnAfterDraw函数中绘制点线面的相关代码

标签:

原文地址:http://www.cnblogs.com/lettet/p/4409998.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!