Question

I want to draw a Circle with Letter punched out of it. to do this, I need to stroke the circle clockwise and the letter counterclockwise.

That is all good and well, but when I get the letter path using Core Text I can't figure out how to essentially reverse the path. NOT MIRROR or ROTATE or anything...that is straightforward enough. I want the point stroke order to be counterclockwise.

it is actually hilariously difficult. I've had entirely too many visual 'off by one' errors.

Was it helpful?

Solution 2

iOS 6 introduced -bezierPathByReversingPath It had some issues at first but it seems to be the answer to this question.

OTHER TIPS

About all I can think of is to call CGPathApply on the path and save information about all of the points, and then redraw the path in the opposite direction. Remember to call CGPathCloseSubpath when you're done.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top