怎么知道图片被CGContextClearRect 擦除了多少

如何知道图片被CGContextClearRect 擦除了多少
各位,如何知道图片被CGContextClearRect 擦除了多少.我想将一张图片擦除到80%的时候就让他全部消失了.但是不知道如何计算擦除了多少像素.请高手帮忙

主要代码:
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
UITouch *touch = [touches anyObject];
if(canEarse)
{
        
CGPoint currentPoint = [touch locationInView:reaseImage];
UIGraphicsBeginImageContext(self.reaseImage.frame.size);
[reaseImage.image drawInRect:reaseImage.bounds];
CGContextClearRect (UIGraphicsGetCurrentContext(), CGRectMake(currentPoint.x, currentPoint.y, 50, 50)); 
reaseImage.image = UIGraphicsGetImageFromCurrentImageContext(); 
UIGraphicsEndImageContext();
}
}



demo下载地址:http://download.****.net/download/xiaohui1224/4318189




------最佳解决方案--------------------
不了解,只能帮顶
------其他解决方案--------------------
没人做过吗?
------其他解决方案--------------------
好吧,我想了一天想出来一个办法说出来大家参考吧:
1.将要擦除的图片虚拟的分割成100块小矩形.
2.当涂抹的x,y经过矩形区域时就将矩形的左定点存入数组(数组内的值不重复)
3.判断等数组内元素大于80个的时候,即意味着涂抹路径已经经过了80块矩形.涂抹了大概80%的图片.

当然,如果要细化还可以将图片分割成更多的矩形.
------其他解决方案--------------------
谢谢darkdong 帮顶