Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325153 - Inconsistent use of NSColorSpaces in Cocoa SWT
Summary: Inconsistent use of NSColorSpaces in Cocoa SWT
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.7   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: 3.7 M3   Edit
Assignee: Scott Kovatch CLA
QA Contact: Silenio Quarti CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-13 14:58 EDT by Scott Kovatch CLA
Modified: 2010-10-21 17:36 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.