Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 325153

Summary: Inconsistent use of NSColorSpaces in Cocoa SWT
Product: [Eclipse Project] Platform Reporter: Scott Kovatch <skovatch>
Component: SWTAssignee: Scott Kovatch <skovatch>
Status: RESOLVED FIXED QA Contact: Silenio Quarti <Silenio_Quarti>
Severity: normal    
Priority: P3    
Version: 3.7   
Target Milestone: 3.7 M3   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:

Description Scott Kovatch CLA 2010-09-13 14:58:45 EDT
Throughout the Cocoa SWT, NSColors are created using NSColor.colorWithDeviceRed(...), but occasionally we use NSCalibratedSpaceName. This leads to bugs like bug 325012.

According to the docs:

file://localhost/Developer/Documentation/DocSets/com.apple.adc.documentation.AppleSnowLeopard.CoreReference.docset/Contents/Resources/Documents/index.html#documentation/Cocoa/Conceptual/DrawColor/Tasks/UsingColorSpaces.html

"Generally, it is recommended that you use calibrated (or generic) color spaces instead of device color spaces. The colors in device color spaces can vary widely from device to device, whereas calibrated color spaces usually result in a reasonably accurate color. Device color spaces, on the other hand, might yield better performance under certain circumstances, so if you know for certain the device that will render or capture the color, use a device color space instead."

This bug tracks refactoring our color code to use the calibrated/generic RGB color space.
Comment 1 Scott Kovatch CLA 2010-09-15 15:16:38 EDT
Waiting for m3 to open up before I check it in.
Comment 2 Scott Kovatch CLA 2010-09-17 20:22:22 EDT
Fixed > 20100917.