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 > NSWIndow and Alpha chanels

NSWIndow and Alpha chanels
Thread Tools
Professional Poster
Join Date: Dec 2000
Location: Chicago, Illinois
Status: Offline
Reply With Quote
Sep 3, 2001, 12:07 PM
 
Okay, here's the deal. I want to take an NSWindow with a BoarderlessWindow mask, make the priavte NSView that draws the frame and everything transparent (I'm not interested in pin stripes) and then draw/composite something in the contentView that is not transparent. So If a put a hoolow square in it, I could see right through my window to the stuff below it. But I've found no good way to do this.

If I do aWindow.setAlpha(0); then the whole window and all it's subviews (including the contentView) are given alpha chanells of 0. This sucks.

If I just make the contentView draw NSColor.clearColor over the whole background, that doesn't do anything either, as I'm not effecting the private NSView that draws the pinstripes.

Does anyone know of a good way to implement this type of thing?

Thanks,
F-bacher
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Sep 4, 2001, 12:46 PM
 
As I'm sure you realised, people replied to your post to various mailing lists, but just to reiterate in case you failed to notice, see apple's RoundTransparentWindow in their cocoa sample code section at http://developer.apple.com/samplecode
     
Professional Poster
Join Date: Dec 2000
Location: Chicago, Illinois
Status: Offline
Reply With Quote
Sep 8, 2001, 11:26 AM
 
Yeah, I know. But for whatever reason I was being a dumbass and not realizing what that smaple code did (actually, the problem was that I tried to look at it on a machine with OS 9, and simpletext was jarrgling the code, and for whatever reason I didn't take a look at it in OS X).

F-bacher
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Sep 8, 2001, 02:34 PM
 
Originally posted by Ghoser777:
<STRONG>Yeah, I know. But for whatever reason I was being a dumbass and not realizing what that smaple code did (actually, the problem was that I tried to look at it on a machine with OS 9, and simpletext was jarrgling the code, and for whatever reason I didn't take a look at it in OS X).</STRONG>
For future reference, this is because UNIX (including Mac OS X Cocoa and BSD) and Mac OS (Classic) use different line breaks. BBEdit can interpret both these and Windows linebreaks. There is also a free BBEdit Lite version available. It's also a lot nicer for reading source in
     
Professional Poster
Join Date: Dec 2000
Location: Chicago, Illinois
Status: Offline
Reply With Quote
Sep 8, 2001, 03:40 PM
 
Originally posted by Angus_D:
<STRONG>

For future reference, this is because UNIX (including Mac OS X Cocoa and BSD) and Mac OS (Classic) use different line breaks. BBEdit can interpret both these and Windows linebreaks. There is also a free BBEdit Lite version available. It's also a lot nicer for reading source in </STRONG>
Oh I know. All I had handy way appleworks though. Now if I could only figure out why compositing images in NSViews seem to suck the life out of my ram, i'd be set.

F-bacher
     
   
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 02:55 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2