equal
deleted
inserted
replaced
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)]; |