Re: NSWindow without background color
Re: NSWindow without background color
- Subject: Re: NSWindow without background color
- From: Wade Tregaskis <email@hidden>
- Date: Fri, 18 Jun 2004 21:45:19 +1000
I have a NSWindow without background color, so I see the horizontal
gray
lines. Then I add some small pictures here and there.
Now I would like to know:
If some professional television post-production user uses my
application,
can he apply his alpha channel to the background of the window?
Or should I use a different color with alpha = 0?
Or does he need a special video board to do that? If so, which one?
Any suggestion would be very appreciated. Thank you.
If you want to draw into a window such that it is not entirely opaque,
the simplest way to do so is to to the window background colour to
[NSColor clearColor] using NSWindow's setBackgroundColor, and also to
tell the same window that it's not opaque, using setOpaque:. Thus, you
have a transparent window which you can draw into as normal. If you're
doing video work, you could use a custom view to render your frames as
necessary.
You'd think there'd be an easy way to get at the window's buffer
itself... I suppose you could substitute the normal content view for
your custom view directly, but that's not quite the same...
nonetheless, performance wise I believe the method I've suggested is
quite practical.
Wade Tregaskis (aim: wadetregaskis)
-- Sed quis custodiet ipsos custodes?
_______________________________________________
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.