Re: Drawing text "with NSText"
Re: Drawing text "with NSText"
- Subject: Re: Drawing text "with NSText"
- From: "Alastair J.Houghton" <email@hidden>
- Date: Sun, 31 Aug 2003 21:19:01 +0100
On Sunday, August 31, 2003, at 08:57 pm, publiclook wrote:
On Sunday, August 31, 2003, at 01:23 PM, Alastair J.Houghton wrote:
From what I can see, it would make sense to use an NSTextStorage, an
NSTextLayoutManager and an NSTextContainer to render text... perhaps
this is what the documentation means?
There is nothing wrong with NSText's -setString and -dislay methods.
What makes you say that NSText isn't capable of drawing all of the
incidental text in a window such as labels ?
Well I suppose it is, but it just seems surprising that you'd use a
subclass of NSView to do this; for one thing, it means you've got to
get it into the right place in the view hierarchy before you can draw.
I suppose it does have the advantage though that the text system has
more control over the view it is rendering into, but it seems odd,
that's all.
My original concern was that perhaps moving a view would cause the
superview to redraw, which would obviously make using an NSView
impossible, but I just knocked-up a toy application that demonstrates
quite clearly that that isn't the case, so I suppose it's fine.
Kind regards,
Alastair.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.