• 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: String height in pixels
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: String height in pixels


  • Subject: Re: String height in pixels
  • From: "Daniel T. Staal" <email@hidden>
  • Date: Thu, 9 Aug 2007 14:29:43 -0400 (EDT)
  • Importance: Normal

On Thu, August 9, 2007 2:26 pm, vance said:
> Hi, I am drawing a string (NSString) using drawAtPoint. My question
> is how do I find the height of the string before I draw it? I need
> this to vertically center the string on the drawing canvas.
> Thanks.
> Vance

NSString Addition method sizeWithAttributes:

http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSString_AppKitAdditions/Reference/Reference.html#//apple_ref/occ/instm/NSString/sizeWithAttributes:

Daniel T. Staal

---------------------------------------------------------------
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------

_______________________________________________

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

References: 
 >String height in pixels (From: vance <email@hidden>)

  • Prev by Date: String height in pixels
  • Next by Date: Re: String height in pixels
  • Previous by thread: String height in pixels
  • Next by thread: Re: String height in pixels
  • Index(es):
    • Date
    • Thread