Re: Transparent Windows WAS: (no subject)
Re: Transparent Windows WAS: (no subject)
- Subject: Re: Transparent Windows WAS: (no subject)
- From: email@hidden
- Date: Thu, 19 Feb 2004 14:26:16 -0800 (PST)
>
On Feb 19, 2004, at 12:40 PM, email@hidden wrote:
>
>
> [osx_window setBackgroundColor: [NSColor clearColor]];
>
> [osx_window setAlphaValue: 1.0];
>
> [osx_window setOpaque: NO];
>
>
>
>
[NSColor clearColor] returns an NSColor whose grayscale and alpha
>
values are both 0.0. The window may be there, but is totally
>
transparent. Try using a color with a non-zero alpha such as
>
blackColor.
[SNIP]
Thanks for your help Mike.
Sorry about being unclear before, but, I _DO_ wish to have a transparent
window (at least its background). Now I think I understand what
[osx_window setOpaque: NO]; does, and what I'm looking to do is more of
[osx_window setBackgroundOpaque: NO]; message (which doesn't exist).
What boggles me is that the RoundedTransparentWindow example uses that
technique but draws to the window differently. I've deduced Allegro uses
QuickDraw, internally, to draw to the port (not sure; I'm beginner when it
comes to OSX GUI programming) with bitmaps from internal buffer(s). Also,
there may be some color conversion that occurs that could turn what should
be a transparent background into black.
Ho-hum...so much code that I don't completely understand.
For those interested, the Allegro OSX code is here
<
http://cvs.sourceforge.net/viewcvs.py/alleg/allegro/src/macosx/> and the
file I'm working on is
<
http://cvs.sourceforge.net/viewcvs.py/alleg/allegro/src/macosx/quartz.m?rev=1.7&view=auto>
(about line 460).
Louis
_______________________________________________
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.