我使用此代码在quartz2d 中画一条线
CGPoint currentPoint = CGPointMake(rascalImage.center.x, rascalImage.center.y);
currentPoint.y += 10;
UIGraphicsBeginImageContext(self.view.frame.size);
[drawingView.image drawInRect:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound);
CGContextSetLineWidth(UIGraphicsGetCurrentContext(), 5.0);
CGContextSetRGBStrokeColor(UIGraphicsGetCurrentContext(), 1.0, 0.0, 0.0, 1.0);
CGContextBeginPath(UIGraphicsGetCurrentContext());
CGContextMoveToPoint(UIGraphicsGetCurrentContext(), lastPoint.x, lastPoint.y);
CGContextAddLineToPoint(UIGraphicsGetCurrentContext(), currentPoint.x, currentPoint.y);
CGContextStrokePath(UIGraphicsGetCurrentContext());
drawingView.image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
lastPoint = currentPoint;
现在我将如何为橡皮擦相交的地方制作擦除功能?我知道我必须从线上擦除某个点(橡皮擦接触的地方),我只是不知道该怎么做,所以请帮忙!