Map coordinates into pagelayout paper coordinates

443
3
11-16-2010 10:10 PM
luqing
by
New Contributor
Map coordinates into pagelayout paper coordinates.What I use is FromPagePoint function??but my map coordinates changed, paper coordinates unchanged.why??How to deal with?
0 Kudos
3 Replies
SteveFang
New Contributor III
So the method you're using is described in the documentation as converting a point on the page to pixels.  I think what you are after is to convert a map pt to a page pt?  If so, trying looking up the IDisplayTransformation interface's "FromMapPoint" method.
0 Kudos
luqing
by
New Contributor
So the method you're using is described in the documentation as converting a point on the page to pixels.  I think what you are after is to convert a map pt to a page pt?  If so, trying looking up the IDisplayTransformation interface's "FromMapPoint" method.


thank you for your answer,I have try, but it don't  work.when i input different map pt, but output the same page pt.why? this is my code:

IActiveViewPtr is PageLayout  property
void CPlotView::MapToLayoutview(IActiveViewPtr& pActiveview,double dMapX,double dMapY,int& iScrX,int& iScrY)
{
IPointPtr ipMapPt(CLSID_Point);
long X,Y;
ipMapPt->PutCoords(dMapX,dMapY);
IScreenDisplayPtr m_pScreendisp;
pActiveview->get_ScreenDisplay(&m_pScreendisp);
IDisplayTransformationPtr m_pDisplaytransfor;
m_pScreendisp->get_DisplayTransformation(&m_pDisplaytransfor);
m_pDisplaytransfor->FromMapPoint(ipMapPt,&X,&Y);
iScrX=int(X);
iScrY=int(Y);
}
0 Kudos
jp
by
New Contributor II
Lu,

Did you find an answer to this one?

I tried using the same code but it doesn't give the right screen coordinates back.

Thanks!
0 Kudos