Re: NSString drawAt: ...
Re: NSString drawAt: ...
- Subject: Re: NSString drawAt: ...
- From: Paul Fox <email@hidden>
- Date: Fri, 21 Jun 2002 21:39:24 +0100
>
On Friday, June 21, 2002, at 01:37 PM, Paul Fox wrote:
>
>
> I have a question regarding NSString and drawing. Drawing is slow -
>
> unimaginably slow, and I have seen questions about this before.
>
>
There is currently an issue with string drawing, that drawing into an
>
unflipped view causes a temporary flipped subview to be added. We hope
>
to address this issue in the future, but in the meantime you will be
>
much better served by making your view flipped. There will be
>
considerable improvements in string drawing performance for Jaguar, but
>
for a view that relies extensively on drawing text--especially one with
>
persistent text, such as a view that edits text--you are likely to get
>
much better performance by using NSLayoutManager directly rather than
>
the string drawing convenience APIs. This is, for example, what
>
NSTextView itself does. The CircleView example shows how to use
>
NSLayoutManager for drawing strings.
>
>
Douglas Davidson
Cool - thanks Doug. I was reading NSLayoutManager today and trying to
make head and tail of it. I'll look more closely and do some testing.
I find it amusing that the view needs to be flipped - to me Cocoa's
co-ord systems is backwards (yes I know it agrees with PostScript),
and I auto-correct for that in my code. Now I find I should be
flipped anyway! I'll try and see what difference that makes in performance
and calls to resetCursorRects.
Thanks!
>
>
+-------------------------------------------------------------------------+
| CRiSP - Flexible editor | CRiSP, syn. for BRIEF |#
| | Internet: email@hidden |#
| If you get no reply for | WWW: (mine)
http://www.crisp.demon.co.uk |#
| support, please check your | WWW:
http://www.crisp.com |#
| Reply-To: email address. | WWW:
http://www.pacemaker.co.uk |#
+-------------------------------------------------------------------------+#
###########################################################################
_______________________________________________
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.