Re: Drawing over a view's subviews
Re: Drawing over a view's subviews
- Subject: Re: Drawing over a view's subviews
- From: Nicko van Someren <email@hidden>
- Date: Wed, 15 Jun 2005 17:58:12 +0100
On 15 Jun 2005, at 17:36, Mark Morrill wrote:
On 15-Jun-05, at 10:12, glenn andreas wrote:
You could also try overriding unlockFocus and do your drawing
before calling [super unlockFocus], which is easier to implement,
but doesn't allow the flexibility that a child window would...
This method looks good.
I'm not sure you're going to find this does what you need. I've not
tested it on Cocoa but you can look at the GNUStep implementation of
NSView to get an idea. Firstly the internal redraw code does not use
unlockFocus at all (it uses the internal unlockFocusNeedsFlush:) and
secondly it wraps the lock/unlock of the focus around the drawing of
your view specifically and not around the drawing of any of the sub-
views. I do not think that this will work.
The overlay window is an interesting option as is the non-opaque
overlay view. But I think those options might have too much
overhead. (sorry, couldn't resist.)
I can't see that one extra view in the view stack is really going to
create much overhead at all. You're talking about putting entire Web
Views inside the lower view; compared to rendering them the cost of
layering a single extra view on top is probably tiny. Given that it
is highly likely to do what you need I'd do it this way and if you
have issue with the performance you should optimise that _after_ you
have it working.
Cheers,
Nicko
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden