• 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
Re: Custom Shadow on an NSWindow
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom Shadow on an NSWindow


  • Subject: Re: Custom Shadow on an NSWindow
  • From: Uli Kusterer <email@hidden>
  • Date: Mon, 19 Feb 2007 10:08:08 +0100


Am 18.02.2007 um 19:30 schrieb Drarok Ithaqua:
Hi list, I'm looking to drop a custom shadow on my window, but I'm totally stuck.

Give us less detail, we're all psychic and need the exercise ;-)

*how* custom? What kind of a window is it? If this is a completely custom window, you can draw your own shadow using NSShadow and drawing into a borderless window. If this is a standard window with a titlebar, I guess all you can do is turn off the shadow using the appropriate NSWindow method.

Sometimes you may have to tell the window its shape changed explicitly so it'll redo its shadow (the shadow is based on the window's opaque region). I think the call is named -reshapeWindow or something like that.

I am assuming that NSShadow is used for this, but I guess this may not be the case.

NSShadow can be used to draw a shadow instead of any drawing. So, if you draw your stuff into an NSImage, you can draw it once with an NSShadow (to get the shadow), and draw your actual drawings on top afterwards. But note that NSShadow only does shadows that fall off to two sides. Standard window shadows fall off to the left *and* right, which I haven't been able to reproduce using NSShadow.


 Then again, it's not as if I had tried very hard.

Cheers,
-- M. Uli Kusterer
http://www.zathras.de



_______________________________________________

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: Custom Shadow on an NSWindow
      • From: Andreas Mayer <email@hidden>
    • Re: Custom Shadow on an NSWindow
      • From: Michael Nickerson <email@hidden>
    • Re: Custom Shadow on an NSWindow
      • From: Michael Watson <email@hidden>
References: 
 >Custom Shadow on an NSWindow (From: Drarok Ithaqua <email@hidden>)

  • Prev by Date: Re: NSScroller shows up, but won't work.
  • Next by Date: Re: Preventing beach balls
  • Previous by thread: Re: Custom Shadow on an NSWindow
  • Next by thread: Re: Custom Shadow on an NSWindow
  • Index(es):
    • Date
    • Thread