• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
See-through effect (ala Terminal, iPhoto HUD windows, Disco)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

See-through effect (ala Terminal, iPhoto HUD windows, Disco)


  • Subject: See-through effect (ala Terminal, iPhoto HUD windows, Disco)
  • From: "David Aames" <email@hidden>
  • Date: Mon, 15 Jan 2007 09:49:09 +0000

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


  • Follow-Ups:
    • Re: See-through effect (ala Terminal, iPhoto HUD windows, Disco)
      • From: Ryan Britton <email@hidden>
    • Re: See-through effect (ala Terminal, iPhoto HUD windows, Disco)
      • From: Michael Watson <email@hidden>
    • Re: See-through effect (ala Terminal, iPhoto HUD windows, Disco)
      • From: Andreas Mayer <email@hidden>
    • Re: See-through effect (ala Terminal, iPhoto HUD windows, Disco)
      • From: Rob Keniger <email@hidden>
  • Prev by Date: Re: NSURLConnection and HTTP Headers
  • Next by Date: Re: See-through effect (ala Terminal, iPhoto HUD windows, Disco)
  • Previous by thread: Custom view: lost connection via uiFreshlyLoadedView?
  • Next by thread: Re: See-through effect (ala Terminal, iPhoto HUD windows, Disco)
  • Index(es):
    • Date
    • Thread