• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to get the "white shadow" effect when drawing NSStrings?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >How to get the "white shadow" effect when drawing NSStrings? (From: Ulai Beekam <email@hidden>)
 >Re: How to get the "white shadow" effect when drawing NSStrings? (From: Brandon Walkin <email@hidden>)
 >RE: How to get the "white shadow" effect when drawing NSStrings? (From: Ulai Beekam <email@hidden>)

  • Prev by Date: RE: How to get the "white shadow" effect when drawing NSStrings?
  • Next by Date: Source code for Chess?
  • Previous by thread: RE: How to get the "white shadow" effect when drawing NSStrings?
  • Next by thread: Re: How to get the "white shadow" effect when drawing NSStrings?
  • Index(es):
    • Date
    • Thread