¡@

Home 

2014/10/15 ¤U¤È 10:08:28

iphone Programming Glossary: erasepath

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

use the previous image. Edit Sample code. Say the area you want to erase from image view imgView is specified with by erasePath void clipImage UIImage img imgView.image CGSize s img.size UIGraphicsBeginImageContext s CGContextRef g UIGraphicsGetCurrentContext.. CGSize s img.size UIGraphicsBeginImageContext s CGContextRef g UIGraphicsGetCurrentContext CGContextAddPath g erasePath CGContextAddRect g CGRectMake 0 0 s.width s.height CGContextEOClip g img drawAtPoint CGPointZero imageView.image UIGraphicsGetImageFromCurrentImageContext..

How erase part of UIImage

http://stackoverflow.com/questions/4526336/how-erase-part-of-uiimage

CGSize s img.size UIGraphicsBeginImageContext s CGContextRef g UIGraphicsGetCurrentContext CGContextAddPath g erasePath CGContextAddRect g CGRectMake 0 0 s.width s.height CGContextEOClip g img drawAtPoint CGPointZero imageView.image UIGraphicsGetImageFromCurrentImageContext.. the system a bitmap image context with given size is needed 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..