Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > drawing over a NSMovieView

drawing over a NSMovieView
Thread Tools
Damian
Fresh-Faced Recruit
Join Date: Jan 2003
Status: Offline
Reply With Quote
Jan 22, 2003, 12:17 PM
 
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.
     
Rickster
Mac Elite
Join Date: Feb 2001
Location: Vancouver, WA
Status: Offline
Reply With Quote
Jan 22, 2003, 05:08 PM
 
z-ordering isn't a fully-supported part of the NSView model -- note that the "bring to front" etc. options only exist in IB and can't be done programmatically -- so views which are peers in the view hierarchy aren't guaranteed to have the same z-order relative to each other all the time.

Generally, this problem can be solved by making the "in front" view a subview of the "in back" view. (Since IB thinks only certain NSView subclasses can be "containers", you'll have to do this programmatically.) However, hardware-accelerated video playing may muck with the NSView drawing model, in which case you might be stuck (or you might be able to solve the problem by dropping down to a lower API level).
Rick Roe
icons.cx | weblog
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 12:11 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,