Re: NSView Issue- Drawing Hierarchy
Re: NSView Issue- Drawing Hierarchy
- Subject: Re: NSView Issue- Drawing Hierarchy
- From: Cameron Hayne <email@hidden>
- Date: Thu, 4 Jul 2002 01:40:33 -0400
On Wednesday, July 3, 2002, at 08:34 pm, j.oie(mecha : himitsu) wrote:
I have a container view(its own subclass of NSView) which holds
alternately a dummy NSView(if nothing needs to be displayed) and a view
of a map(e.g., a castle in a role-playing game). I would like the
container view to facilitate spiffy dissolves between maps- say, a
closing-shutters effect. The effect is easily attained with
NSRectFill(), but here's the problem: An NSView (or a subclass
thereof) draws all of its subviews in the act of drawing itself- after
it draws itself! So the still-live map view will cover the pretty
dissolve rectangles with its own background
How about doing the following sequence to effect the dissolve transition
you want:
1) copy the image from the sub-view into the container view (via the
container view's drawRect)
2) remove the sub-view (I expect this will trigger a setNeedsDisplay on
the container view)
3) draw your transition animation (e.g. using NSTimer)
4) add the new sub-view
--
Cameron Hayne (email@hidden)
Hayne of Tintagel
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.