diff --git a/ChangeLog b/ChangeLog index 63a247544..e61a139b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +1999-10-22 Adam Fedor + + * Source/NSColor.m ([NSColor -set]): Implement (from backend). + Fri Oct 22 1999 Nicola Pero * Documentation/gnustep-gui.tmpl.texi (Keyboard Modifiers): diff --git a/Source/NSColor.m b/Source/NSColor.m index 65f814e10..abbb6ac08 100644 --- a/Source/NSColor.m +++ b/Source/NSColor.m @@ -40,6 +40,7 @@ #include #include #include +#include NSString *NSSystemColorsDidChangeNotification = @"NSSystemColorsDidChangeNotification"; @@ -1049,6 +1050,34 @@ static NSMutableDictionary *colorStrings = nil; - (void) set { + switch (active_component) + { + case GNUSTEP_GUI_RGB_ACTIVE: + NSDebugLLog(@"NSColor", @"RGB %f %f %f\n", RGB_component.red, + RGB_component.green, RGB_component.blue); + PSsetrgbcolor(RGB_component.red, RGB_component.green, + RGB_component.blue); + break; + + case GNUSTEP_GUI_CMYK_ACTIVE: + NSDebugLLog(@"NSColor", @"CMYK %f %f %f %f\n", CMYK_component.cyan, + CMYK_component.magenta, + CMYK_component.yellow, CMYK_component.black); + PSsetcmykcolor(CMYK_component.cyan, CMYK_component.magenta, + CMYK_component.yellow, CMYK_component.black); + break; + + case GNUSTEP_GUI_HSB_ACTIVE: + NSDebugLLog(@"NSColor", @"HSB %f %f %f\n", HSB_component.hue, + HSB_component.saturation, HSB_component.brightness); + PSsethsbcolor(HSB_component.hue, HSB_component.saturation, + HSB_component.brightness); + break; + + case GNUSTEP_GUI_WHITE_ACTIVE: + NSDebugLLog(@"NSColor", @"Gray %f\n", white_component); + PSsetgray(white_component); + } } //