Reputation: 4287
I am looking for way to clear the current path in the CGContextRef
? I want to replace with current path in CGContextRef
with new CGPathRef
.
I thought I could you CGContextReplacePathWithStrokedPath
? But for that too, I have to clear the current path stored in CGContextRef
.
Upvotes: 3
Views: 1748
Reputation: 81878
CGContextBeginPath clears the current path:
A graphics context can have only a single path in use at any time. If the specified context already contains a current path when you call this function, Quartz discards the old path and any data associated with it.
Upvotes: 5