ArcGIS Engine 10 开发手册(10-2)矢量格式地图输出
发布时间: 2018-02-14
所属分类: ArcGIS Engine 10 开发手册
矢量格式文件的输出主要是依靠 IExportVector 接口,该接口被以下 5 个类实现:
输出EMF格式
private void ExportEMF ()
{
IActiveView pActiveView;
pActiveView = axPageLayoutControl1.ActiveView;
IExport pExport;
pExport = new ExportEMFClass ();
pExport.ExportFileName = @"E:\arcgis\Engine\ExportEMF.emf";
pExport.Resolution = 300;
tagRECT exportRECT;
exportRECT = pActiveView.ExportFrame;
IEnvelope pPixelBoundsEnv;
pPixelBoundsEnv = new EnvelopeClass ();
pPixelBoundsEnv.PutCoords (exportRECT.left, exportRECT.top, exportRECT.right, exportRECT.bottom);
pExport.PixelBounds = pPixelBoundsEnv;
int hDC;
hDC = pExport.StartExporting ();
pActiveView.Output (hDC, (int) pExport.Resolution, ref exportRECT, null, null);
pExport.FinishExporting ();
pExport.Cleanup ();
}
输出PDF格式
private void ExportPDF ()
{
IActiveView pActiveView;
pActiveView = axPageLayoutControl1.ActiveView;
IEnvelope pEnv;
pEnv = pActiveView.Extent;
IExport pExport;
pExport = new ExportPDFClass ();
pExport.ExportFileName = @"E:\arcgis\Engine\ExportPDF.pdf";
pExport.Resolution = 30;
tagRECT exportRECT;
exportRECT.top = 0;
exportRECT.left = 0;
exportRECT.right = (int) pEnv.Width;
exportRECT.bottom = (int) pEnv.Height;
IEnvelope pPixelBoundsEnv;
pPixelBoundsEnv = new EnvelopeClass ();
pPixelBoundsEnv.PutCoords (exportRECT.left, exportRECT.bottom, exportRECT.right, exportRECT.top);
pExport.PixelBounds = pPixelBoundsEnv;
int hDC;
hDC = pExport.StartExporting ();
pActiveView.Output (hDC, (int) pExport.Resolution, ref exportRECT, null, null);
pExport.FinishExporting ();
pExport.Cleanup ();
}
ArcGIS Engine 10 开发手册全集
ArcGIS Engine 10 开发手册全集: ArcGIS Engine 10 开发手册
相关阅读
声明
1.本文所分享的所有需要用户下载使用的内容(包括但不限于软件、数据、图片)来自于网络或者麻辣GIS粉丝自行分享,版权归该下载资源的合法拥有者所有,如有侵权请第一时间联系本站删除。
2.下载内容仅限个人学习使用,请切勿用作商用等其他用途,否则后果自负。
手机阅读
公众号关注
知识星球
手机阅读
最新GIS干货
私享圈子