iphone Programming Glossary: cgcontexteoclip
How to erase some portion of a UIImageView's image on iOS? http://stackoverflow.com/questions/1487601/how-to-erase-some-portion-of-a-uiimageviews-image-on-ios g UIGraphicsGetCurrentContext CGContextAddPath g erasePath CGContextAddRect g CGRectMake 0 0 s.width s.height CGContextEOClip g img drawAtPoint CGPointZero imageView.image UIGraphicsGetImageFromCurrentImageContext UIGraphicsEndImageContext share..
How to erase part of an image as the user touches it http://stackoverflow.com/questions/2978382/how-to-erase-part-of-an-image-as-the-user-touches-it from.y CGContextAddLineToPoint g to.x to.y CGContextClosePath g CGContextAddRect g CGRectMake 0 0 s.width s.height CGContextEOClip g image drawAtPoint CGPointZero bkgdImageView.image UIGraphicsGetImageFromCurrentImageContext UIGraphicsEndImageContext..
How erase part of UIImage http://stackoverflow.com/questions/4526336/how-erase-part-of-uiimage g UIGraphicsGetCurrentContext CGContextAddPath g erasePath CGContextAddRect g CGRectMake 0 0 s.width s.height CGContextEOClip g img drawAtPoint CGPointZero imageView.image UIGraphicsGetImageFromCurrentImageContext UIGraphicsEndImageContext Maybe.. and then you get a reference to it. CGContextAddPath g erasePath CGContextAddRect g CGRectMake 0 0 s.width s.height CGContextEOClip g Here you provide a path to the context and then clip the context. That's to say only draw in these regions. img drawAtPoint..
|