cocoaTouch/otherSrc/UIImageExtra.m
changeset 3361 cfc6cd502f85
parent 3352 ac5d14a35482
child 3463 23c50be687a9
equal deleted inserted replaced
3360:717b4e46e855 3361:cfc6cd502f85
    29   return scaledImage;
    29   return scaledImage;
    30 }
    30 }
    31 
    31 
    32 -(UIImage *)mergeWith:(UIImage *)secondImage atPoint:(CGPoint) secondImagePoint {
    32 -(UIImage *)mergeWith:(UIImage *)secondImage atPoint:(CGPoint) secondImagePoint {
    33     // create a contex of size of the background image
    33     // create a contex of size of the background image
    34     UIGraphicsBeginImageContext(self.size);
    34     return [self mergeWith:secondImage atPoint:secondImagePoint atSize:self.size];
       
    35 }
       
    36 
       
    37 -(UIImage *)mergeWith:(UIImage *)secondImage atPoint:(CGPoint) secondImagePoint atSize:(CGSize) resultingSize {
       
    38     UIGraphicsBeginImageContext(resultingSize);
    35     
    39     
    36     // drav the background image
    40     // drav the background image
    37     [self drawAtPoint:CGPointMake(0,0)];
    41     [self drawAtPoint:CGPointMake(0,0)];
    38     
    42     
    39     // draw the image on top of the first image
    43     // draw the image on top of the first image