When I use:
[iconImage drawInRect:NSMakeRect(cellFrame.origin.x+5,yOffset+3,cellFrame.size.height-6, cellFrame.size.height-6)
fromRect:NSMakeRect(0,0,[iconImage size].width, [iconImage size].height)
operation:NSCompositeSourceOver
fraction:1.0];
to draw some images in the NSOutlineView cells, the images are vertically flipped upside down. How can I fix it ?
Thanks
Use the method
- (void)drawInRect:(NSRect)dstSpacePortionRect
fromRect:(NSRect)srcSpacePortionRect
operation:(NSCompositingOperation)op
fraction:(CGFloat)requestedAlpha
respectFlipped:(BOOL)respectContextIsFlipped
hints:(NSDictionary *)hints
along with - (void)lockFocusFlipped:(BOOL)flipped
to draw the image upside down. From the NSImage Reference manual.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With