Re: drawAtPoint - is it really slow?
Re: drawAtPoint - is it really slow?
- Subject: Re: drawAtPoint - is it really slow?
- From: Douglas Davidson <email@hidden>
- Date: Wed, 28 Aug 2002 15:21:27 -0700
On Wednesday, August 28, 2002, at 03:02 PM, John Nairn wrote:
Thanks, I have been looking at CircleView and will give it a try. Two
quick questions if you do not mind:
1. Should I flip even if using Circle view or does that not help for
that method?
With this technique you can be flipped or not, whichever is more
convenient for you.
2. CircleView is somewhat complicated. It draws character by character
because each one is rotated differently. Can a similar approach draw a
whole string or will it still need to be character by character?
Actually, it draws glyph by glyph, because, as you say, each one is
rotated differently. However, you can draw as few or as many glyphs at
a time as you like; the relevant line contains
drawGlyphsForGlyphRange:NSMakeRange(glyphIndex, 1), and the 1 there is
telling it to draw only one glyph. You can substitute any glyph range
you like--just divide up the text into ranges appropriate for drawing
with the same location and transform. Remember that glyph ranges
generally are not the same as character ranges; NSLayoutManager has
methods for converting from one to the other.
Douglas Davidson
_______________________________________________
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.