How heavy is NSLayoutManager?
How heavy is NSLayoutManager?
- Subject: How heavy is NSLayoutManager?
- From: Frank Canova <email@hidden>
- Date: Tue, 2 Jun 2009 12:50:53 -0400
I'm working on an app that will have various pieces of text laid out
inside paths (i.e. a non-rectangular NSTextContainer).
The requirements are:
1) Each chunk of text will be a separate object that has to know how
to draw itself.
2) The objects can be moved, rotated, skewew *without* layout by
changing the CTM when drawing.
3) If the path is changed by moving a control point, the text should
lay itself out again.
Giving each object its own NSTextView would be overkill, as well as
interfering with other things that need to be drawn.
The obvious choice is to give each object its own NSTextStorage-
>NSLayoutManager->NSTextContainer setup and use -[NSLayoutManager
drawGlyphsForGlyphRange:atPoint:]
The NSTextStorage is clearly required and the NSTextContainer is
pretty lightweight.
But how heavy is NSLayoutManager? It has a bunch of private objects
so it's hard to judge from looking at the header file. Would it be a
problem handing out several dozen of them?
Cheers,
Frank
_______________________________________________
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