Created
May 23, 2013 19:56
-
-
Save ashfurrow/5638960 to your computer and use it in GitHub Desktop.
Soft Light Rendering Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CGImageRef imageRef = CGImageCreateWithImageInRect([rootViewController.gradientImage CGImage], CGRectMake(point.x, self.minY + self.superview.frame.origin.y, size.width, self.maxY - self.minY)); | |
UIImage *img = [UIImage imageWithCGImage:imageRef]; | |
CGImageRelease(imageRef); | |
UIGraphicsBeginImageContext(self.backgroundImage.frame.size); | |
[img drawAtPoint:CGPointZero blendMode:kCGBlendModeSoftLight alpha:1]; | |
[aImage drawAtPoint:CGPointZero blendMode:kCGBlendModeSoftLight alpha:alpha]; | |
UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); | |
UIGraphicsEndImageContext(); | |
self.backgroundImage.image = image; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment