• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: PDFMarkupAnnotations not showing when drawing PDFPage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PDFMarkupAnnotations not showing when drawing PDFPage


  • Subject: Re: PDFMarkupAnnotations not showing when drawing PDFPage
  • From: Antonio Nunes <email@hidden>
  • Date: Fri, 16 Feb 2007 22:11:13 +0000


On Feb 16, 2007, at 7:33 PM, John Calhoun wrote:

That was unintentional. It was really a cut/paste from the actual class (in Leopard).

Sometimes the unintentional is very convenient. ;-)

So if I have this straight:

Both annotations display on a PDFView.
Only the Circle annotation displays in your NSView.

Absolutely straight.

So what else peculiar does the Highlight do? It draws with a multiply compositing mode. How that would affect a vanilla NSView I don't know....

Try (on your NSView) a StrikeThrough annotation (no multiply compositing involved).

Aha, now we're getting somewhere: the results (whether for strikeout or underline type) depend on the color, both in the NSView and in the PDFView:
-blackColor draws an opaque black on the PDFView produces no output whatsoever the NSView
-yellowColor draws an opaque yellow on the PDFView and an opaque white on the NSView
-grayColor draws an opaque gray in the PDFView and a semitransparent gray on the NSView
-blueColor draws an opaque blue on the PDFView produces no output whatsoever the NSView
-greenColor draws an opaque green on the PDFView and an opaque black on the NSView
-redColor draws an opaque red on the PDFView and produces no output whatsoever on the NSView


Switching back to highlight type and experimenting with different colors I found that gray results in a lighter shade of gray being drawn in the NSView and that a green highlight results in an *opaque* black. (The PDFView colors were as they should be.)

Worst case scenario, you could subclass PDFAnnotationMarkup and implement your own:
- (void) drawWithBox: (PDFDisplayBox) box

Well, since I had already subclassed it, that was easy. But, alas: the drawWithBox method doesn't get called. The subclass is otherwise functional, as we had seen before. Any alternatives? If we have to go the subclassing way and get the drawing method called, I would also need to know the exact ratio between the bound's height and the linewidth for all three markup types, as used by the superclass to be able to correctly mimic the behavior.


António

----------------------------------------------------
It is better to light a candle than to curse the darkness
----------------------------------------------------



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: PDFMarkupAnnotations not showing when drawing PDFPage
      • From: John Calhoun <email@hidden>
References: 
 >PDFMarkupAnnotations not showing when drawing PDFPage (From: Antonio Nunes <email@hidden>)
 >Re: PDFMarkupAnnotations not showing when drawing PDFPage (From: John Calhoun <email@hidden>)
 >Re: PDFMarkupAnnotations not showing when drawing PDFPage (From: Antonio Nunes <email@hidden>)
 >Re: PDFMarkupAnnotations not showing when drawing PDFPage (From: John Calhoun <email@hidden>)
 >Re: PDFMarkupAnnotations not showing when drawing PDFPage (From: Antonio Nunes <email@hidden>)
 >Re: PDFMarkupAnnotations not showing when drawing PDFPage (From: John Calhoun <email@hidden>)
 >Re: PDFMarkupAnnotations not showing when drawing PDFPage (From: Antonio Nunes <email@hidden>)
 >Re: PDFMarkupAnnotations not showing when drawing PDFPage (From: John Calhoun <email@hidden>)

  • Prev by Date: Popup slider?
  • Next by Date: Re: NSView -nextKeyView and -previousKeyView only working once
  • Previous by thread: Re: PDFMarkupAnnotations not showing when drawing PDFPage
  • Next by thread: Re: PDFMarkupAnnotations not showing when drawing PDFPage
  • Index(es):
    • Date
    • Thread