我在当前图形上下文中有一个贝塞尔路径,我想将其存储为 UIBezierPath 或 CGPath。你知道如何从 CGContextRef 中获取路径吗?
最佳答案
您可以使用 CGContextCopyPath
复制上下文的当前路径。
没有复制剪切路径的功能。实际上,如果您使用了 CGContextClipToMask
,则剪辑区域不会由路径定义。
关于ios - 从 CGContextRef 获取 UIBezierPath 或 CGPath,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17245986/