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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to