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 (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com