【发布时间】:2012-02-29 16:18:02
【问题描述】:
我正在使用 CGContext 进行一些绘图。我目前正在使用这样的 png 文件屏蔽绘图:
UIImage * myImage = [UIImage imageNamed:@"frame.png"];
CGContextRef context = UIGraphicsGetCurrentContext ();
CGContextClipToMask(context, self.view.bounds, myImage.CGImage);
这很好用,但现在我想使用现有的 CGPathRef 作为我的掩码。 我应该看一下将 CGPathRef 转换为 UIImage 和上面的掩码吗? 如果是这样,我将如何进行转换? -或者- 有没有更好的方法来解决这个问题?
【问题讨论】:
标签: objective-c core-graphics cgpath