Hi,
I am writting a plug-in for Adobe Acrobat. In the plug-in I want to place a custom dialog at a specific position.
That position has to be specified in (global) screen coordinates.
Unfortunately, I can not get this position directly via the Acrobat SDK. What I can get is a CGrafPtr (which I can convert to a CGContextRef) to draw on the page. This offset would be enough to find the coordinates I need.
Is there any way to translate between GrafPtr/CGContextRef (either of them would be sufficient .) to screen coordinates?
So e.g. I start drawing a rectangle at point (0,0) -> how can I get the absolute screen coordinate where this rectangle is located - or where the port has it's origin?
Thank you very much for your help in advance.
Regards
Michael
I am writting a plug-in for Adobe Acrobat. In the plug-in I want to place a custom dialog at a specific position.
That position has to be specified in (global) screen coordinates.
Unfortunately, I can not get this position directly via the Acrobat SDK. What I can get is a CGrafPtr (which I can convert to a CGContextRef) to draw on the page. This offset would be enough to find the coordinates I need.
Is there any way to translate between GrafPtr/CGContextRef (either of them would be sufficient .) to screen coordinates?
So e.g. I start drawing a rectangle at point (0,0) -> how can I get the absolute screen coordinate where this rectangle is located - or where the port has it's origin?
Thank you very much for your help in advance.
Regards
Michael