页面载入中....

页面载入中....

公告

页面载入中....

文章

评论

留言

连接

信息

登陆

搜索

2007-10-9 9:55:00
AO中用点选的方式选择点、线、面等(part3)

不好意思,上次发的这部分,应该还有下面这一个函数,有的朋友提出来这个函数没有定义,现在给出。呵呵,希望大家不要太责备我
double  ConvertPixelToMapUnits(IActiveViewPtr pActiveView  , double pixelUnits)
{
  
 double realWorldDisplayExtent;
 int pixelExtent;
 double sizeOfOnePixel;
 IScreenDisplayPtr ipScreenDisp;
 IDisplayTransformationPtr ipDispTrf;
 tagRECT trect;
 IEnvelopePtr Visiblebound;
 
 
    pActiveView->get_ScreenDisplay(&ipScreenDisp);
 ipScreenDisp->get_DisplayTransformation(&ipDispTrf);
 ipDispTrf->get_DeviceFrame(&trect);
 pixelExtent=trect.right - trect.left;
 ipDispTrf->get_VisibleBounds(&Visiblebound);
 Visiblebound->get_Width(&realWorldDisplayExtent);
 sizeOfOnePixel=realWorldDisplayExtent/pixelExtent;
 return pixelUnits * sizeOfOnePixel;

}



  • 标签:AO 点选 
  • 发表评论:

      大名:
      密码: (游客无须输入密码)
      主页:
      标题:
      页面载入中....
    Powered by Oblog.