SaveFileDialog dialog = new SaveFileDialog();
dialog.Title = "保存输出图片";
dialog.Filter = "JPG文件(*.jpg)|*.jpg|BMP文件(*.bmp)|*.bmp||";
if (dialog.ShowDialog() == DialogResult.OK)
{
tagRECT grect;
string str = System.IO.Path.GetExtension(dialog.FileName).ToLower();
IExport export = null;
if (str == ".jpg")
{
export = new ExportJPEGClass();
}
else
{
export = new ExportBMPClass();
}
export.ExportFileName = dialog.FileName;
int num = 0x60;
int num2 = ;
export.Resolution = num2;
grect.left = ;
grect.top = ;
tagRECT deviceFrame = this.m_pMapControl.ActiveView.ScreenDisplay.DisplayTransformation.get_DeviceFrame();//.DeviceFrame;
grect.right = (int) (((deviceFrame.right - deviceFrame.left) * num2) / ((double) num));
grect.bottom = (int) (((deviceFrame.bottom - deviceFrame.top) * num2) / ((double) num));
IEnvelope envelope = new EnvelopeClass();
envelope.PutCoords((double) grect.left, (double) grect.top, (double) grect.right, (double) grect.bottom);
export.PixelBounds = envelope;
int hdc = export.StartExporting();
double resolution = export.Resolution;
this.m_pMapControl.ActiveView.Output(hdc, (int) resolution, ref grect, null, null);
export.FinishExporting();
export.Cleanup();
}

最新文章

  1. Memcache的增删改查
  2. IIS7.5支持解析读取.json文件数据
  3. Shell概述
  4. linux dsp 播放音频文件
  5. Android开发之初识Camera图像采集
  6. 1190: [HNOI2007]梦幻岛宝珠 - BZOJ
  7. Java中List的排序
  8. 读书笔记之 - javascript 设计模式 - 适配器模式
  9. shell检测interface是否已分配ip,qt调用shell脚本
  10. 《Effective C++》:规定44-规定45
  11. Git基础命令的使用
  12. MySQL 服务安装及命令使用
  13. 【kmp】 剪花布条 HDU - 2087
  14. react-native android 权限问题
  15. Docker容器管理及代码调用
  16. TCP/IP 三次握手,温故知新
  17. 【Java并发编程二】同步容器和并发容器
  18. VMware Workstation 11 中 Ubuntu 14.04 的 VMware Tools 问题 :没有显示共享文件夹
  19. 推荐一款编辑SQL的工具:jsqlparser
  20. C++(一)——HelloWorld

热门文章

  1. Ogre分层渲染 (转)
  2. [Oracle] Group By 语句的扩展 - Rollup、Cube和Grouping Sets
  3. Android自己定义DataTimePicker(日期选择器)
  4. Android 进阶学习:事件分发机制全然解析,带你从源代码的角度彻底理解(上)
  5. VRP相关知识整理
  6. UNIX标准化及实现之POSIX标准扩展头文件
  7. Python_爬虫2
  8. struts开发经验汇总
  9. XML 之 与Json或String的相互转换
  10. 以WCF安全认证方式调用通用权限管理系统获取基础信息资料