Re: Drawing in front of a NSMovieView
Re: Drawing in front of a NSMovieView
- Subject: Re: Drawing in front of a NSMovieView
- From: Stéphane Sudre <email@hidden>
- Date: Wed, 22 Jan 2003 18:29:22 +0100
On Wednesday, January 22, 2003, at 06:02 PM, Prendergast wrote:
I need to draw in front of a playing NSMovieView. I created a NSView
subclass,
and placed it over the NSMovieView. I "move[d] to back" the
NSMovieView. It
draws fine when I put an mp3 in the movie view, but when a .mov is
playing, the
image is superimposed over everything else. How do I draw in front of
an
NSMovieView? Not even a button, moved to the front, can be seen
beneath it.
I may have have an answer for this.
While making a GUI Kit for OS 9, I ran into this problem. The solution
is to set the ClipRect of the movie using the coordinates of the
widgets above it.
I was using this API:
if (mNeedToBeUpdate==true)
{
::SetMovieDisplayClipRgn(mMovie,GetVisibleRegion3());
mNeedToBeUpdate=false;
}
where mMovie is a Movie and GetVisibleRegion3() is computing the
visible region of the WBMovieView widget using the widget hierarchy. In
your case, it could be simplify to computing the RgnHandle by
substracting the NSView subclass frame from the NSMovie frame.
Now, I don't know if it's going to work for OS X but since you can do
overlaying with NSOpenGLView why not with NSMovieView.
_______________________________________________
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.