Re: Erasing drawn content
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