Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CATextLayer metrics



Thanks Scott and Bill!

On 01/03/2008, at 3:42 AM, Scott Anguish wrote:

CATextLayer is largely a convenience class. It provides text features, but very little flexibility.

You can easily subclass CALayer and create your own text layer that uses NSFont, complex text layout , and all the familiar methods. Plus you'll get more flexibility.

I guess that was the answer all along..


The irksome thing is that rolling your own text layer means duplicating pretty-well all of CATextLayer (maybe that's not much!) - all for the want of some details of how the text is rendered... If details were published, it would be pretty easy to subclass and reuse - which is, of course, one of the main features and objectives of object-oriented programming.



But Scott is probably right in that I might want more flexibility than could be provided by any subclassing of CATextLayer.



Thanks again guys!


Karl

_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >CATextLayer metrics (From: Karl Goiser <email@hidden>)
 >Re: CATextLayer metrics (From: Scott Anguish <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.