sizeWithAttributes Cutting Off Drop Shadow, Italic Mask?
sizeWithAttributes Cutting Off Drop Shadow, Italic Mask?
- Subject: sizeWithAttributes Cutting Off Drop Shadow, Italic Mask?
- From: Chunk 1978 <email@hidden>
- Date: Fri, 30 Oct 2009 11:10:18 -0400
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.
NSSize stringSize = [string sizeWithAttributes:attributes];
NSImage *anImage = [[NSImage alloc] initWithSize:stringSize];
NSRect imageBounds;
imageBounds.origin = NSZeroPoint;
imageBounds.size = stringSize;
[anImage lockFocus];
[self drawStringCenteredIn:imageBounds];
[anImage unlockFocus];
Attachment:
drag.jpg
Description: JPEG image
_______________________________________________
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