Created
April 2, 2013 12:35
-
-
Save tediscript/5291879 to your computer and use it in GitHub Desktop.
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
| - (UIImage*) drawImage:(UIImage*) fgImage inImage:(UIImage*) bgImage atPoint:(CGPoint) point { | |
| UIGraphicsBeginImageContextWithOptions(bgImage.size, FALSE, 0.0); | |
| [bgImage drawInRect:CGRectMake( 0, 0, bgImage.size.width, bgImage.size.height)]; | |
| [fgImage drawInRect:CGRectMake( point.x, point.y, fgImage.size.width, fgImage.size.height)]; | |
| UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext(); | |
| UIGraphicsEndImageContext(); | |
| return newImage; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment