Re: display optimization / display rectangles
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