Re: How to get the "white shadow" effect when drawing NSStrings?
Re: How to get the "white shadow" effect when drawing NSStrings?
- Subject: Re: How to get the "white shadow" effect when drawing NSStrings?
- From: Graham Cox <email@hidden>
- Date: Sun, 22 Feb 2009 01:31:50 +1100
On 22/02/2009, at 1:22 AM, Ulai Beekam wrote:
Is there no way to do it without a cell? I ask because I'm writing
my own custom view and need to be able to do this with NSString's
drawInRect, using a correct font attribute. The other poster's
suggestion of just using a white text and shifting by 1.0 does not
give me the desired effect since it also has the net effect of
making the letters look thinner.
You can add a shadow attribute (NSShadowAttributeName) to the string
attributes and set it up to be white, with the appropriate offset and
blur. (You'll probably have to experiment to find out the exact
settings you'll need).
--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