• 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: Erasing drawn content
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Erasing drawn content


  • Subject: Re: Erasing drawn content
  • From: Matej Bukovinski <email@hidden>
  • Date: Wed, 9 Jun 2010 09:37:06 +0200

Thanks everyone for all the great suggestions. I'll try it out and report back how it went. The clipping path method seems promising.

> Except that would still rely on inserting a custom view in the
> WebView's private scrollview hierarchy.

It doesn't really. Inserting a NSBee as a subview of the WebView would produce the same results as creating an overlay Window.

To justify a bit why I decided to just insert it in the WebView. If you draw an overlay on top (what I was doing at first), you still need to access the WebView's scrollview in order to observe its contentView's frame (so your overlay can match the content size and exclude any scrollbars from the overlay) and its documentView's bounds (so you can account for the scrolling and reposition your drawing).
Drawing an overlay does in fact tend to save you some memory, but on the other hand requires a lot of redrawing when you resize or scroll your WebView. Since both methods basically rely on the WebView's main scroll view being where it is, I don't think that inserting a view is much more dangerous than doing an overlay on top.

And for those who just tuned in, NSBee is of course a NSView. 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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

References: 
 >Erasing drawn content (From: Matej Bukovinski <email@hidden>)
 >Re: Erasing drawn content (From: Steve Christensen <email@hidden>)
 >Re: Erasing drawn content (From: Matej Bukovinski <email@hidden>)
 >Re: Erasing drawn content (From: Kyle Sluder <email@hidden>)
 >Re: Erasing drawn content (From: Kyle Sluder <email@hidden>)
 >Re: Erasing drawn content (From: "Paul Sanders" <email@hidden>)
 >Re: Erasing drawn content (From: Matej Bukovinski <email@hidden>)
 >Re: Erasing drawn content (From: Kyle Sluder <email@hidden>)
 >Re: Erasing drawn content (From: Quincey Morris <email@hidden>)
 >Re: Erasing drawn content (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: FSCopyObjectAsync hogging the thread?
  • Next by Date: Re: Invalid exception being thrown: CIUnsharpMask is not kvc for the key inputIntensity - except that it is
  • Previous by thread: Re: Erasing drawn content
  • Next by thread: Re: Erasing drawn content
  • Index(es):
    • Date
    • Thread