Re: See-through effect (ala Terminal, iPhoto HUD windows, Disco)
Re: See-through effect (ala Terminal, iPhoto HUD windows, Disco)
- Subject: Re: See-through effect (ala Terminal, iPhoto HUD windows, Disco)
- From: Ryan Britton <email@hidden>
- Date: Mon, 15 Jan 2007 08:59:00 -0800
Scroll down to HUDWindow
http://mattgemmell.com/source/
On Jan 15, 2007, at 1:49 AM, David Aames wrote:
Hello all,
I'd say that this is my last attempt to ask about this on the list.
Basically what I'm trying to achieve is the HUD window effect in
iPhoto/transparency in Terminal. I've tried several approaches to
no avail.
Here's what I've attempted:
1. Implement a NSWindow subclass with a custom frame (what
iLifeControls &
OpenHUD does). This works perfectly to give the look but there is
one big
problem - because the NSViews lie on the window and the window
background is
not opaque and transparent all NSViews drop a shadow. So basically
if you
move a slider in iLifeControls/OpenHUD it leaves a ghosting effect.
The only
way around this is to invalidate the shadow on every redraw but
that is so
inefficient that the slider is almost unusable.
2. Use child windows. As described here
http://www.cocoabuilder.com/archive/message/cocoa/2007/1/13/177105
there is
bug which prevents using this method. (
http://www.cocoabuilder.com/archive/message/cocoa/2007/1/10/176913)
Ideally what I need to implement is a kind of see-through view so
the window
actually think that the area is fully opaque but actually isn't.
Take a look
at Terminal with transparency - you cannot see the titlebar dropping a
shadow so somehow the window thinks that the area is not
transparent. So
ideally I need a way to fool the window to draw its shadow only
around its
border and not under the window.
I've been using Quartz Debug to try and figure out how the other
apps are
doing it and it seems that they're using hidden windows to do some
magic -
not sure how they're being used to achieve that effect.
This question has been asked numerous times on the list and it
seems that no
one wants to uncover their way of doing it (which is a pity
really). Please,
can some of the holy Cocoa gurus on the list enlighten us all on
_how_ to
achieve this (not code, just guidelines)? I'm truly thankful to
anyone who
can offer some help on this.
Kind regards,
David
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden