Re: Displaying a number with Quartz
Re: Displaying a number with Quartz
- Subject: Re: Displaying a number with Quartz
- From: Graham Cox <email@hidden>
- Date: Wed, 27 May 2009 12:34:34 +1000
On 27/05/2009, at 12:24 PM, Pierre Berloquin wrote:
That would mean dropping all the niceties of Quartz that lets me draw
outlined text, for one.
That's not the case. The attributes you pass in -
drawAtPoint:withAttributes: can include outlines
(NSStrokeWidthAttributeName) in different colours
(NSStrokeColorAttributeName), shadows (NSShadowAttributeName),
underlines and strikethroughs, all in different colours from the main
text fill.
Furthermore, the CGContextShowText... methods accept a C string
argument, so they can't cope with unicode. Neither can they apply
attributes in ranges. Both issues are entirely solved by
NSAttributedString. This class has infinitely more "niceties" than raw
Quartz text.
--Graham
_______________________________________________
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