• 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: display optimization / display rectangles
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: display optimization / display rectangles


  • Subject: Re: display optimization / display rectangles
  • From: Graham Cox <email@hidden>
  • Date: Fri, 15 May 2009 15:24:36 +1000


On 15/05/2009, at 3:09 AM, David Harper wrote:

I find this behavior to be somewhat bizarre, but nonetheless the solution seems to be to only draw a white rectangle using the NSIntersectionRect of both relevant rectangles. However, this causes a broken-up shadow appearance. Should I abandon the idea of a smooth NSShadow in favor of an additional black rectangle with 50% opacity instead? Is there a better way to draw a smooth shadow?


One problem is that currently, ANY shadow drawing will drag your drawing performance into the mud. That's especially true on lower end machines like the MacBook.

NSShadow (and the underlying CFShadow code) uses Gaussian blurring which is very nice and smooth but can be very processor intensive, especially if the blur radius or the object being shadowed is large.

You might need to cache the shadow in an image or just use a simple solid "shadow" as you suggested.

--Graham


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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: display optimization / display rectangles
      • From: Graham Cox <email@hidden>
References: 
 >display optimization / display rectangles (From: David Harper <email@hidden>)

  • Prev by Date: Re: Check box with differwnt backgrouns colours
  • Next by Date: Re: display optimization / display rectangles
  • Previous by thread: Re: display optimization / display rectangles
  • Next by thread: Re: display optimization / display rectangles
  • Index(es):
    • Date
    • Thread