Small changes for colour space handling.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28947 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2009-11-03 21:32:52 +00:00
parent 8899d486e7
commit 4e00a49a68
3 changed files with 25 additions and 1 deletions

View file

@ -1166,6 +1166,13 @@ systemColorWithName(NSString *name)
count: (int)number
{
// FIXME
if (space == [NSColorSpace genericRGBColorSpace] && (number == 4))
{
return [self colorWithCalibratedRed: comp[0]
green: comp[1]
blue: comp[2]
alpha: comp[3]];
}
if (space == [NSColorSpace deviceRGBColorSpace] && (number == 4))
{
return [self colorWithDeviceRed: comp[0]
@ -1173,10 +1180,22 @@ systemColorWithName(NSString *name)
blue: comp[2]
alpha: comp[3]];
}
if (space == [NSColorSpace genericGrayColorSpace] && (number == 2))
{
return [NSColor colorWithCalibratedWhite: comp[0] alpha: comp[1]];
}
if (space == [NSColorSpace deviceGrayColorSpace] && (number == 2))
{
return [NSColor colorWithDeviceWhite: comp[0] alpha: comp[1]];
}
if (space == [NSColorSpace genericCMYKColorSpace] && (number == 5))
{
return [NSColor colorWithDeviceCyan: comp[0]
magenta: comp[1]
yellow: comp[2]
black: comp[3]
alpha: comp[4]];
}
if (space == [NSColorSpace deviceCMYKColorSpace] && (number == 5))
{
return [NSColor colorWithDeviceCyan: comp[0]