cocoaTouch/otherSrc/UIImageExtra.m
changeset 3361 cfc6cd502f85
parent 3352 ac5d14a35482
child 3463 23c50be687a9
--- a/cocoaTouch/otherSrc/UIImageExtra.m	Mon Apr 19 15:30:11 2010 +0000
+++ b/cocoaTouch/otherSrc/UIImageExtra.m	Wed Apr 21 01:57:23 2010 +0000
@@ -31,7 +31,11 @@
 
 -(UIImage *)mergeWith:(UIImage *)secondImage atPoint:(CGPoint) secondImagePoint {
     // create a contex of size of the background image
-    UIGraphicsBeginImageContext(self.size);
+    return [self mergeWith:secondImage atPoint:secondImagePoint atSize:self.size];
+}
+
+-(UIImage *)mergeWith:(UIImage *)secondImage atPoint:(CGPoint) secondImagePoint atSize:(CGSize) resultingSize {
+    UIGraphicsBeginImageContext(resultingSize);
     
     // drav the background image
     [self drawAtPoint:CGPointMake(0,0)];