ArcEngine添加标题
2013-04-12 10:07
211 查看
private void addTitle() { //ESRI.ArcGIS.Carto.IActiveView activeView; //ESRI.ArcGIS.Carto.IGraphicsContainer graphicsContainer; //ESRI.ArcGIS.Carto.ITextElement textElement; //ESRI.ArcGIS.Display.ITextSymbol textSymbol; //ESRI.ArcGIS.Display.IRgbColor rgbColor; //ESRI.ArcGIS.Carto.IElement element; //ESRI.ArcGIS.Geometry.IEnvelope envelope; //activeView = axPageStation.PageLayout as ESRI.ArcGIS.Carto.IActiveView; //envelope = new ESRI.ArcGIS.Geometry.EnvelopeClass(); //envelope.PutCoords(-14, 29, 35, 29); //textElement = new ESRI.ArcGIS.Carto.TextElementClass(); //element = textElement as ESRI.ArcGIS.Carto.IElement; //element.Geometry = envelope; //textElement.Text = DateTime.Now.ToString("yyyy年M月d日") + "北京市**区站点降雨图"; //textSymbol = new ESRI.ArcGIS.Display.TextSymbolClass(); //rgbColor = new ESRI.ArcGIS.Display.RgbColorClass(); //rgbColor.Red = 0; //rgbColor.Green = 0; //rgbColor.Blue = 0; //textSymbol.Color = rgbColor as ESRI.ArcGIS.Display.IColor; //IFontDisp pFont = new StdFont() //{ // Name = "宋体", // Bold = true, // //Size=30 //} as IFontDisp; //textSymbol.Font = pFont; //textSymbol.Size = 30; //textElement.Symbol = textSymbol; //graphicsContainer = activeView as ESRI.ArcGIS.Carto.IGraphicsContainer; //graphicsContainer.AddElement(element, 0); //axPageStation.Refresh(); //IActiveView activeView = axPageStation.PageLayout as IActiveView; //IGraphicsContainer graphicsContainer = activeView as IGraphicsContainer; IGraphicsContainer graphicsContainer = axPageStation.PageLayout as IGraphicsContainer; IEnvelope envelope = new EnvelopeClass(); envelope.PutCoords(-14, 29, 35, 29); IRgbColor pColor = new RgbColorClass() { Red = 0, Blue = 0, Green = 0 }; IFontDisp pFont = new StdFont() { Name = "宋体", Bold = true } as IFontDisp; ITextSymbol pTextSymbol = new TextSymbolClass() { Color = pColor, Font = pFont, Size = 30 }; ITextElement pTextElement = new TextElementClass() { Symbol = pTextSymbol, ScaleText = true, Text = DateTime.Now.ToString("yyyy年M月d日") + "北京市**区站点降雨图" }; IElement element = pTextElement as ESRI.ArcGIS.Carto.IElement; element.Geometry = envelope; graphicsContainer.AddElement(element, 0); axPageStation.Refresh(); }
相关文章推荐
- [ArcEngine地图制图系列]—添加地图标题
- 【地图整饰】ArcMap添加地图标题及ArcEngine实现
- ArcGIS教程:将标题和总览图页添加到地图册
- 在播放Flv视频时添加标题或边框(1)
- 帝国CMS标题截取添加省略号的问题
- 大华摄像头如何添加通道标题
- 入门视频处理5:怎么给视频添加标题效果和文字效果?
- 标题: 添加Udev规则,让Linux自动挂载U盘。。(支持热插拔)[转]
- wxPython中添加窗口标题图标
- ArcEngine添加Legend—图例
- [带GIF效果图(PagerSlidingTabStrip添加下滑上滑功能)根据触摸事件的传递,滑动收起或下拉viewpager的标题指示器
- 了解<hx>标签,为你的网页添加标题
- 在listview 控件标题上添加图标的模块 (VB)
- itext添加标题(heading)
- PagerTabStrip在ViewPager的页面中添加标题显示
- ArcEngine添加栅格后,不能闪烁问题
- 为什么在后台添加了文章,前台只能看到标题?
- 标签文档添加双击标题自动关闭事件
- <hx>标签,为网页内容添加标题
- ExtJs 实现动态列,动态多表头 在这里添加日志标题