Re: Visual alignment problems when using NSText drawAtPoint:withAttributes
Re: Visual alignment problems when using NSText drawAtPoint:withAttributes
- Subject: Re: Visual alignment problems when using NSText drawAtPoint:withAttributes
- From: Yann Bizeul <email@hidden>
- Date: Wed, 28 Sep 2005 17:15:58 +0200
The problem I'm seeing is that the visual alignment is not what I'm
hoping for: the text is off center to the left. Am I missing
something? I want my labels to resemble the labels that one sees in
Mail.app dock icon to indicate the number of unread messages. I've
experimented with boundingRectWithSize:options:attributes, and it
seems to work better, but still didn't look exactly right, and, I
need my app to run under 10.3.
I remember something like this with drawing text.
Take a look at your paragraph alignment attributes, try using
NSLeftTextAlignment or NSCenterTextAlignment and see the difference.
You could also try using drawInRect instead of drawAtPoint.
As far as I remember, it was a consistent behavior :-)
Yann Bizeul • yann at tynsoe.org
Cocoa Developer
Tynsoe Projects
BuddyPop • GeekTool • SSH Tunnel Manager • ...
http://projects.tynsoe.org/ _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden