¡@

Home 

2014/10/15 ¤U¤È 10:03:30

iphone Programming Glossary: addclip

How to highlight a UIButton subclass?

http://stackoverflow.com/questions/10084606/how-to-highlight-a-uibutton-subclass

shadow2 CGContextSetFillColorWithColor context shadow2 roundedRectanglePath fill roundedRectanglePath addClip CGContextDrawLinearGradient context redGradient CGPointMake 160 55 CGPointMake 160 5 0 Rounded Rectangle Inner Shadow CGRect.. CGSizeMake xOffset copysign 0.1 xOffset yOffset copysign 0.1 yOffset shadowBlurRadius shadow roundedRectanglePath addClip CGAffineTransform transform CGAffineTransformMakeTranslation round roundedRectangleBorderRect.size.width 0 roundedRectangleNegativePath..

UIImage with smooth rounded corners in quartz

http://stackoverflow.com/questions/14071278/uiimage-with-smooth-rounded-corners-in-quartz

rect CGRectMake 0 0 self.size.width self.size.height UIBezierPath bezierPathWithRoundedRect rect cornerRadius radius addClip Draw your image self drawInRect rect Get the image here setting the UIImageView image UIImage roundedImage UIGraphicsGetImageFromCurrentImageContext..

UIImage with transparent rounded corners

http://stackoverflow.com/questions/4885713/uiimage-with-transparent-rounded-corners

orig.size NO 0 UIBezierPath bezierPathWithRoundedRect CGRect CGPointZero orig.size cornerRadius r addClip orig drawInRect CGRect CGPointZero orig.size UIImage result UIGraphicsGetImageFromCurrentImageContext UIGraphicsEndImageContext..

UIBezierPath Subtract Path

http://stackoverflow.com/questions/8859285/uibezierpath-subtract-path

path when we're done CGContextSaveGState UIGraphicsGetCurrentContext Now we can modify the clipping path clipPath addClip and we can fill bigMaskPath UIColor orangeColor setFill bigMaskPath fill Finally we restore the graphics state undoing the.. appendPath smallMaskPath clipPath.usesEvenOddFillRule YES CGContextSaveGState UIGraphicsGetCurrentContext clipPath addClip UIColor orangeColor setFill bigMaskPath fill CGContextRestoreGState UIGraphicsGetCurrentContext share improve this answer..