文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > 高等教育 > 工学 > ArcGIS Engine开发系列:将地图导出为图片的两种方法
侵权投诉

ArcGIS Engine开发系列:将地图导出为图片的两种方法

ArcGis Engine+c# 二次开发实用资料

export = new ESRI.ArcGIS.Output.ExportTIFFClass(); }

else if (outPath.EndsWith(".bmp"))

{

export = new ESRI.ArcGIS.Output.ExportBMPClass(); }

else if (outPath.EndsWith(".emf"))

{

export = new ESRI.ArcGIS.Output.ExportEMFClass(); }

else if (outPath.EndsWith(".png"))

{

export = new ESRI.ArcGIS.Output.ExportPNGClass(); }

else if (outPath.EndsWith(".gif"))

{

export = new ESRI.ArcGIS.Output.ExportGIFClass(); }

export.ExportFileName = outPath;

IEnvelope pEnvelope = pView.Extent;

//导出参数

export.Resolution = 300;

tagRECT exportRect = new tagRECT();

exportRect.left = exportRect.top = 0;

exportRect.right = outRect.Width;

exportRect.bottom = (int)(exportRect.right * pEnvelope.Height / pEnvelope.Width);

ESRI.ArcGIS.Geometry.IEnvelope envelope = new

ESRI.ArcGIS.Geometry.EnvelopeClass();

//输出范围

envelope.PutCoords(exportRect.left, exportRect.top,

exportRect.right, exportRect.bottom);

export.PixelBounds = envelope;

//可用于取消操作

ITrackCancel pCancel = new CancelTrackerClass();

export.TrackCancel = pCancel;

pCancel.Reset();

//点击ESC键时,中止转出

pCancel.CancelOnKeyPress = true;

pCancel.CancelOnClick = false;

pCancel.ProcessMessages = true;

//获取handle

System.Int32 hDC = export.StartExporting();

上一页第3页

TOP相关主题

你可能喜欢

热门文档

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email