-isFlipped not working right when drawing IconAndTextCell to NSImage
-isFlipped not working right when drawing IconAndTextCell to NSImage
- Subject: -isFlipped not working right when drawing IconAndTextCell to NSImage
- From: "Lawrence Sanbourne" <email@hidden>
- Date: Fri, 28 Apr 2006 20:13:19 -0500
Hello,
I'm fairly new to Cocoa drawing, and I'm having a problem with
-isFlipped that I haven't been able to figure out. From a subclass of
NSTableView, I'm drawing one of the table's IconAndTextCell objects
into an NSImage to create a custom drag image:
- (NSImage *)dragImageForRowsWithIndexes:(NSIndexSet *)dragRows
tableColumns:(NSArray *)tableColumns event:(NSEvent *)dragEvent
offset:(NSPointPointer)dragImageOffset {
//...
[dragImage lockFocus];
[cell drawWithFrame:cellDrawingFrame inView:self];
[dragImage unlockFocus];
//...
return dragImage;
}
IconAndTextCell is careful to check the -isFlipped status of its
controlView. However, this is causing the icon in the cell to draw in
the wrong place. If I negate the conditional on the if([controlView
isFlipped]) in IconAndTextCell, the problem is fixed for drag images
-- but then of course all the other IconAndTextCells look weird.
What am I doing wrong?
Larry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden