Dragging Image
Dragging Image
- Subject: Dragging Image
- From: Herr Witten <email@hidden>
- Date: Sat, 31 Jan 2004 22:48:58 -0500
I have an NSTableView subclass that overrides the dragging image:
- (NSImage *)dragImageForRows:(NSArray *)dragRows event:(NSEvent
*)dragEvent dragImageOffset:(NSPointPointer)dragImageOffset
{
NSImage* image = [super dragImageForRows: dragRows event: dragEvent
dragImageOffset: dragImageOffset];
NSImage* imageProper = [[NSImage alloc] initWithSize: [image size]];
[imageProper lockFocus];
[[[NSColor selectedControlColor] colorWithAlphaComponent: 0.5]
set];
NSRect fillRect = NSMakeRect(0, 0, 0, 0);
fillRect.size = [imageProper size];
[NSBezierPath fillRect: fillRect];
[image dissolveToPoint: NSMakePoint(0, 0) fraction: 1.0];
[imageProper unlockFocus];
return imageProper;
}
The result is a translucent blue rectangle with black text.
How do I invert the text to make it white? Thanks.
Herr Witten
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.