[NSString sizeWithAttributes:] returned value too small
[NSString sizeWithAttributes:] returned value too small
- Subject: [NSString sizeWithAttributes:] returned value too small
- From: Stéphane Sudre <email@hidden>
- Date: Wed, 11 Sep 2002 16:02:53 +0200
Is the value returned by sizeWithAttributes: supposed to give the
appropriate size needed to display the string in a Rect?
I'm using this code:
tSize=[tString sizeWithAttributes:tFontAttribute];
[tString
drawInRect:NSMakeRect(frame.size.width-UNIT_HORIZONTAL_OFFSET-
UNIT_LENGTH,TOTAL_VERTICAL_OFFSET-3,tSize.width, tSize.height)
withAttributes:tFontAttribute];
and the width I'm getting is one pixel short leading to incorrect
drawing (instead of KB, I'm getting K).
This is working fine in 10.1 and the issue is occurring in 10.2.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.