СoreGraphics text drawing performance
СoreGraphics text drawing performance
- Subject: СoreGraphics text drawing performance
- From: Nazar Bartosik <email@hidden>
- Date: Thu, 12 Jul 2012 19:15:20 +0200
In order to have my text visible at any background I draw it twice: once in stroke mode and then once in fill mode.
Code sample below:
CGContextSetTextDrawingMode(ctx, kCGTextStroke); // Stroke mode
[string drawAtPoint:point withFont:font];
CGContextSetTextDrawingMode(ctx, kCGTextFill); // Fill mode
[string drawAtPoint:point withFont:font];
The text of the string is changed frequently and the view to which the string is drawn is being redrawn about 10 times per second.
It turns out that drawing text in stroke mode takes about 80% of drawing time, but the drawing in fill view happens very fast.
I wonder if is there any more efficient way to draw the text in stroke mode, since this one seem to be quite slow.
With kindest regards, Nazar Bartosik.
_______________________________________________
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