Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Dragging Image



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.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.