RLT
RLT

Reputation: 4287

Clear the current path in CGContextRef?

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

Answers (1)

Nikolai Ruhe
Nikolai Ruhe

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

Related Questions