project_files/HedgewarsMobile/Classes/UIImageExtra.m
changeset 3778 2e61bb50cc57
parent 3697 d5b30d6373fc
child 3829 81db3c85784b
equal deleted inserted replaced
3777:5276f2150d65 3778:2e61bb50cc57
    34     // create a contex of size of the background image
    34     // create a contex of size of the background image
    35     return [self mergeWith:secondImage atPoint:secondImagePoint atSize:self.size];
    35     return [self mergeWith:secondImage atPoint:secondImagePoint atSize:self.size];
    36 }
    36 }
    37 
    37 
    38 -(UIImage *)mergeWith:(UIImage *)secondImage atPoint:(CGPoint) secondImagePoint atSize:(CGSize) resultingSize {
    38 -(UIImage *)mergeWith:(UIImage *)secondImage atPoint:(CGPoint) secondImagePoint atSize:(CGSize) resultingSize {
       
    39     if (secondImage == nil) {
       
    40         DLog(@"Warning, secondImage == nil");
       
    41         return self;
       
    42     }
       
    43     
    39     // Create a bitmap graphics context; this will also set it as the current context
    44     // Create a bitmap graphics context; this will also set it as the current context
    40     UIGraphicsBeginImageContext(resultingSize);
    45     UIGraphicsBeginImageContext(resultingSize);
    41 
    46 
    42     // draw the background image in the current context
    47     // draw the background image in the current context
    43     [self drawAtPoint:CGPointMake(0,0)];
    48     [self drawAtPoint:CGPointMake(0,0)];