Re: sizeWithAttributes Cutting Off Drop Shadow, Italic Mask?
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