Changeset 2971
- Timestamp:
- 06/18/05 00:22:32 (4 years ago)
- Files:
-
- Footagehead/trunk/FHImage.m (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
Footagehead/trunk/FHImage.m
r2959 r2971 246 246 cgRect = CGRectMake(rect.origin.x, rect.origin.y, rect.size.width, rect.size.height); 247 247 248 if(_flipped) { 249 CGContextSaveGState(cgContext); 250 CGContextTranslateCTM(cgContext, 0.0f, rect.origin.y + rect.origin.y + rect.size.height); 251 CGContextScaleCTM(cgContext, 1.0f, -1.0f); 252 } 253 248 254 CGContextDrawImage(cgContext, cgRect, _CGImage); 255 256 if(_flipped) 257 CGContextRestoreGState(cgContext); 249 258 } 250 259 else if(_NSImage) { … … 254 263 255 264 if(imageRep) { 256 if([imageRep hasAlpha] || _flipped) { 257 [_NSImage setFlipped:_flipped]; 265 [_NSImage setFlipped:_flipped]; 266 267 if([imageRep hasAlpha] || _flipped) 258 268 [_NSImage drawInRect:rect fromRect:NSMakeRect(0.0, 0.0, _size.width, _size.height) operation:NSCompositeSourceOver fraction:1.0]; 259 } else {269 else 260 270 [imageRep drawInRect:rect]; 261 }262 271 } 263 272 }
