开发者

Best way to trace a letter on iPhone

Want to create an app where a child would trace a letter with their finger as they learn to write the letter.

I would show a letter on the screen say "开发者_如何转开发b" and at the top of the "b" there would be a small arrow which the child drags top to bottom and along the curve on the right. As the tracing occurs, the color of the letter changes from blue to yellow for example.

The question is this:

Is it possible to draw a letter on the screen and get the boundaries of the letter?


If it's for handwriting practice, you're better off drawing the glyph yourself (thus you know exactly where it is) isntead of getting the system to handle it.

Imagine the situation where someone has set a symbolic font like Wingdings on their device.


A CGPath from a CGGlyph (letter) should give you what you're after.


Maybe something as simple as having a white background and a black font, so that you can check to see whether the pixels under the user's finger include any black pixels.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜