• 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: Visual alignment problems when using NSText drawAtPoint:withAttributes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Visual alignment problems when using NSText drawAtPoint:withAttributes (From: John Fox <email@hidden>)

  • Prev by Date: Different behaviour of like and contains in predicates
  • Next by Date: Re: no change counts from CoreData undoManager
  • Previous by thread: Visual alignment problems when using NSText drawAtPoint:withAttributes
  • Next by thread: How do you fill an NSBezierPath with transparent color?
  • Index(es):
    • Date
    • Thread