mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 20:47:38 +00:00
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:
parent
6d3f57e366
commit
16312cec5e
3 changed files with 25 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2009-11-03 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSColor.m (-colorUsingColorSpace): Support more color spaces.
|
||||
* Source/NSColorSpace.m (COLORSPACE): Initialize the static variable.
|
||||
|
||||
2009-11-03 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/GSThemeDrawing.m: Add more includes to apeace Riccardo's compiler.
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
}
|
||||
|
||||
#define COLORSPACE(model) \
|
||||
static NSColorSpace *csp; \
|
||||
static NSColorSpace *csp = nil; \
|
||||
if (!csp) \
|
||||
csp = [[self alloc] _initWithColorSpaceModel: model]; \
|
||||
return csp;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue