Quantcast
Channel: Adobe Community : Popular Discussions - InDesign SDK
Viewing all articles
Browse latest Browse all 78596

X,Y coordinates of a page item in indesign cs3

$
0
0

Hi,

     I need to get the X,Y coordinates of a selected page item based on left-top of the frame. I tried all possible methods to find X,Y coordinates of a page item. But calculated coordinates is warrying from indesign UI displayed X,Y coordinates.

 

My code snippet is below:

 

InterfacePtr<IHierarchy> node(itemRef, IID_IHIERARCHY);

InterfacePtr<ITransform> transform(node, IID_ITRANSFORM);

PMMatrix inner2parent =transform->GetInnerToParentMatrix();

PBPMRect bBox =pGeometry->GetStrokeBoundingBox(inner2parent);

PMPoint leftTop=bBox.LeftTop();

 

 

The itemRef is my selected rectangle frame reference.

Anything wrong in my code please give a solution immediately. I need a exact X,Y coordinates like indesign Ui displayed.

 

Thanks

K.Saravanan


Viewing all articles
Browse latest Browse all 78596


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>