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