• 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: sizeWithAttributes Cutting Off Drop Shadow, Italic Mask?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sizeWithAttributes Cutting Off Drop Shadow, Italic Mask?


  • Subject: Re: sizeWithAttributes Cutting Off Drop Shadow, Italic Mask?
  • From: Ricky Sharp <email@hidden>
  • Date: Fri, 30 Oct 2009 10:22:59 -0500


On Oct 30, 2009, at 10:10 AM, Chunk 1978 wrote:

does sizeWithAttributes not take into account the offset of an NSDropShadow
or italic font mask? i have a dictionary of attributes for a string, and
i'm trying to produce an image for the drag that doesn't crop the image with
these attributes.


It doesn't consider the shadow metrics.  I filed this in 2004:

<rdar://3910767> "Cocoa string drawing doesn't take shadow metrics in account"

The workaround is to use the shadow metrics and modify the size value. I do the following myself:

width modified by (shadow x offset plus blur radius)
height modified by (shadow y offset plus blur radius)

I believe the Italic issue also needs a workaround (search this list archives because that has come up before)

___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Instant Interactive(tm)   http://www.instantinteractive.com



_______________________________________________

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: 
 >sizeWithAttributes Cutting Off Drop Shadow, Italic Mask? (From: Chunk 1978 <email@hidden>)

  • Prev by Date: sizeWithAttributes Cutting Off Drop Shadow, Italic Mask?
  • Next by Date: Re: Trying blocks
  • Previous by thread: sizeWithAttributes Cutting Off Drop Shadow, Italic Mask?
  • Next by thread: EndianU32_NtoB
  • Index(es):
    • Date
    • Thread