I have a bezier path inside the current graphics context that I want to store as a UIBezierPath or CGPath. Do you know how to get the path out of a CGContextRef?
You can copy the context's current path using CGContextCopyPath
.
There is no function that copies the clipping path. Indeed, the clipping region won't be defined by a path if you've used CGContextClipToMask
.
You can use the CGContextCopyPath
function:
CGPathRef myPath = CGContextCopyPath(context);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With