 |
 |
NSWIndow and Alpha chanels
|
 |
|
 |
|
Professional Poster
Join Date: Dec 2000
Location: Chicago, Illinois
Status:
Offline
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|