Re: Applying a Drop Shadow to an NSView
Re: Applying a Drop Shadow to an NSView
- Subject: Re: Applying a Drop Shadow to an NSView
- From: George Orthwein <email@hidden>
- Date: Wed, 16 Aug 2006 00:03:35 -0400
On Aug 15, 2006, at 11:02 PM, August Trometer wrote:
This should work for you. Keep in mind that you'll need to adjust
both the shadow parameters and the area that you're filling -- as I
said, you'll run up against the view's bounds and the shadow will
get cut off if you're not careful.
You may just want to inset the bounds of the view to get an
appropriate area to fill.
- (void)drawRect:(NSRect)rect {
NSRect fillRect = NSInsetRect([self bounds], 10.0, 10.0);
Also, Matt Gemmell's RoundedBox example shows subclassing an NSBox to
create a custom look. It doesn't use a drop shadow but could be a
good starting point.
http://mattgemmell.com/source/
Hope that helps,
George
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden