Re: Erasing drawn content
Re: Erasing drawn content
- Subject: Re: Erasing drawn content
- From: Jens Alfke <email@hidden>
- Date: Wed, 9 Jun 2010 10:19:13 -0700
On Jun 9, 2010, at 10:07 AM, Paul Sanders wrote:
> If the clipping path method works, and if you can subclass your webview, then you shouldn't need a separate view at all. Just override drawRect: and draw your rectangles after calling super. It sounds almost too easy.
Actually there are subviews inside a WebView, one per frame; it’s those you’d need to subclass and I don’t think there’s a public factory method you can override, so I don’t know how you’d get your subclass instantiated.
Also, while overriding -drawRect: works for many views, I have serious doubts it would work for WebKit content. WebKit rendering is insanely complex and I’m pretty sure it’s not all bottlenecked through the -drawRect: call. That is, I think in many situations it will just lockFocus and draw into its view directly instead of calling -setNeedsDisplayInRect: and waiting for AppKit to redraw it.
—Jens_______________________________________________
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