Changeset 5375
- Timestamp:
- 03/13/08 18:22:29 (7 months ago)
- Files:
-
- WiredAdditions/trunk/NSImage-WIAdditions.h (modified) (1 diff)
- WiredAdditions/trunk/NSImage-WIAdditions.m (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
WiredAdditions/trunk/NSImage-WIAdditions.h
r4438 r5375 36 36 - (NSImage *)mirroredImage; 37 37 - (NSImage *)scaledImageWithSize:(NSSize)size; 38 - (NSImage *)imageBySuperimposingImage:(NSImage *)image; 38 39 39 40 - (NSImage *)imageWithAffineTransform:(NSAffineTransform *)transform action:(SEL)action; WiredAdditions/trunk/NSImage-WIAdditions.m
r4798 r5375 212 212 213 213 214 - (NSImage *)imageBySuperimposingImage:(NSImage *)image { 215 NSImage *newImage; 216 NSSize size; 217 218 size = [self size]; 219 [image setSize:size]; 220 221 newImage = [[NSImage alloc] initWithSize:size]; 222 [newImage lockFocus]; 223 224 [self drawAtPoint:NSZeroPoint 225 fromRect:NSMakeRect(0.0, 0.0, size.width, size.height) 226 operation:NSCompositeSourceOver 227 fraction:1.0]; 228 229 [image drawAtPoint:NSZeroPoint 230 fromRect:NSMakeRect(0.0, 0.0, size.width, size.height) 231 operation:NSCompositeSourceOver 232 fraction:1.0]; 233 234 [newImage unlockFocus]; 235 236 return [newImage autorelease]; 237 } 238 239 240 214 241 #pragma mark - 215 242
