导出为栅格地图,
if (m_Map == null) return;
IExport pExport = null;
switch (m_Index)
{
case 1:
pExport = new ExportBMPClass();
break;
case 2:
pExport = new ExportGIFClass();
break;
case 3:
pExport = new ExportJPEGClass();
break;
case 4:
pExport = new ExportPNGClass();
break;
case 5:
pExport = new ExportTIFFClass();
break;
}
// 分辨率
int iResolution = trackBar.Value;
tagRECT exportRect = new tagRECT();
exportRect.left = 0;
exportRect.top = 0;
exportRect.right = 1024;
exportRect.bottom = 768;
// 定义输出图片的大小
IEnvelope pPixelBoundsEnv = new EnvelopeClass();
pPixelBoundsEnv.PutCoords(exportRect.left, exportRect.top, exportRect.right, exportRect.bottom);
pExport.ExportFileName = m_strFileName;
pExport.Resolution = iResolution;
pExport.PixelBounds = pPixelBoundsEnv;
IActiveView pActiveView = m_Map as IActiveView;
int hDC = pExport.StartExporting();
pActiveView.Output(hDC, iResolution, ref exportRect, pActiveView.FullExtent, null);
pExport.FinishExporting();
pExport.Cleanup();
1万+

被折叠的 条评论
为什么被折叠?



