Quantcast
Channel: Adobe Community: Message List - Acrobat SDK
Viewing all articles
Browse latest Browse all 10848

Re: AVAnnotHandlerDrawExProc providing the wrong coordinates for Annotations when on a Retina Display

$
0
0

I submitted an official bug through the proper channel but didn't get any kind of reference number or anything to reference my submission in the future.

 

 

Here is the function which is a reference to API callback "AVAnnotHandlerDrawExProc".  The numbers for each structure here are identical when switching between high-res/low-res on the same Retina Display yet they are displayed in the wrong position and at the wrong size in high-res mode.

 

//AcroFmDrawEx

static ACCB1 void ACCB2 AcroFmDrawEx( AVAnnotHandler handler, PDAnnot pdAnnot, AVPageView pageView, AVRect* pRect )

{

void* port = AVPageViewAcquireMachinePort(pageView);

 

  ASFixedRect userPDAnnot;

  AVRect deviceRect, aperture;

  Rect dstRect;

 

  PDAnnotGetRect( pdAnnot, &userPDAnnot );

 

  AVPageViewRectToDevice(pageView, &userPDAnnot, &deviceRect);

 

  AVPageViewGetAperture( pageView, &aperture );

 

  dstRect.left = deviceRect.left - aperture.left;

  dstRect.top = deviceRect.top - aperture.top;

  dstRect.right = deviceRect.right - aperture.left;

  dstRect.bottom = deviceRect.bottom - aperture.top;

 

 

CopyBits(GetPortBitMapForCopyBits(port), GetPortBitMapForCopyBits(port), &dstRect, &dstRect, srcXor, 0);

 

AVPageViewReleaseMachinePort(pageView, port);

}


Viewing all articles
Browse latest Browse all 10848

Trending Articles