mirror of
https://github.com/darlinghq/darling-cocotron.git
synced 2024-10-07 17:43:28 +00:00
NSImageCell flip image if view flipped
This commit is contained in:
parent
bf3e9bfef3
commit
3d5630fe81
@ -171,7 +171,14 @@ static NSSize scaledImageSizeInFrameSize(NSSize imageSize,NSSize frameSize,NSIma
|
||||
CGContextSaveGState(ctx);
|
||||
CGContextClipToRect(ctx,frame);
|
||||
|
||||
frame=[self _scaledAndAlignedImageFrame:frame];
|
||||
frame=[self _scaledAndAlignedImageFrame:frame];
|
||||
|
||||
if([control isFlipped]){
|
||||
CGAffineTransform flip={1,0,0,-1,0,frame.size.height};
|
||||
|
||||
CGContextConcatCTM(ctx,flip);
|
||||
}
|
||||
|
||||
[[self _imageValue] drawInRect:frame fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
|
||||
|
||||
CGContextRestoreGState(ctx);
|
||||
|
Loading…
Reference in New Issue
Block a user