• 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: Ulai Beekam <email@hidden>
  • Date: Sat, 21 Feb 2009 14:22:07 +0000
  • Importance: Normal

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.

----------------------------------------
> CC: email@hidden
> From: email@hidden
> To: email@hidden
> Subject: Re: How to get the "white shadow" effect when drawing NSStrings?
> Date: Sat, 21 Feb 2009 06:22:25 -0500
>
> Use a cell to draw your text and call -setBackgroundStyle: on it with
> the parameter NSBackgroundStyleRaised. That'll apply the exact same
> shadow that's used on toolbar item labels. Keep in mind that this
> method is Leopard-only.
>
> On 21-Feb-09, at 6:10 AM, Ulai Beekam wrote:
>
>>
>> Hi,
>>
>> Just take a look at any toolbar text in Leopard. It has a subtle,
>> white shadow. How can I get this very same effect in my own app when
>> using NSString's drawInRect method? What attributes to use? Do you
>> have any sample code?
>>
>> Thanks, U.
>>
>>
>>
>> _________________________________________________________________
>> More than messages–check out the rest of the Windows Live™.
>> http://www.microsoft.com/windows/windowslive/_______________________________________________
>>
>> 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
>

_________________________________________________________________
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx_______________________________________________

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

  • Follow-Ups:
    • Re: How to get the "white shadow" effect when drawing NSStrings?
      • From: Ken Ferry <email@hidden>
    • Re: How to get the "white shadow" effect when drawing NSStrings?
      • From: Graham Cox <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>)

  • Prev by Date: Re: infoForBinding not working as expected
  • Next by Date: Re: How to get the "white shadow" effect when drawing NSStrings?
  • 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