Re: Retrieving the current -[NSShadow set]
Re: Retrieving the current -[NSShadow set]
- Subject: Re: Retrieving the current -[NSShadow set]
- From: "Michael Ash" <email@hidden>
- Date: Fri, 25 Jul 2008 10:02:29 -0400
On Fri, Jul 25, 2008 at 9:57 AM, Keith Duncan <email@hidden> wrote:
>> The "need" to do this suggests a possible problem with your design. What
>> are you trying to do?
>
> I'm refactoring a method I found online that takes an explicit NSShadow
> argument. I felt that was a poor design as most of the the drawing
> properties are implicit in nature; color, transform and shadow are all a
> property of the current NSGraphicsContext and they should be respected in
> drawing rountines that require them.
They *are* respected in drawing routines that require them. If you set
a shadow, then call a drawing routine, that shadow is respected.
So if your function needs to draw using a shadow, and you don't want
to pass it in, all you need to do is set the shadow before you call
it.
Mike
_______________________________________________
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