【发布时间】:2012-09-20 03:56:18
【问题描述】:
我有下一个代码,每次用户触摸屏幕并修改 UIBezierPath 时都会调用它
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextDrawImage(context, self.bounds, image);
[lineColor setStroke];
[currentPath stroke];
if(panEnded)
{
if(image!=nil)
{
CFRelease(image);
}
image=nil;
image=CGBitmapContextCreateImage(context);
panEnded=false;
}
所以每次我创建新图像(来自“if”分支)时,它都会旋转 180 度。我做错了什么?
【问题讨论】:
标签: objective-c ios cgcontext cgimage