home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / ComputerScience / MethodsInAction / MethodsInAction.app / GrayScale.m < prev    next >
Encoding:
Text File  |  1992-08-19  |  412 b   |  29 lines

  1. /*  GrayScale.m    Jeff Froyd.     */
  2.  
  3.  
  4. #import "GrayScale.h"
  5. #import <appkit/Slider.h>
  6. #import <dpsclient/wraps.h>
  7.  
  8. @implementation GrayScale
  9.  
  10.    double currentGray;
  11.  
  12. -setDoubleValue:(double)newGrayValue;
  13. {
  14.     currentGray = newGrayValue;
  15.         [self display];
  16.     return self;
  17. }
  18.  
  19. -drawSelf:(NXRect *)r:(int)c
  20. {
  21.     PSsetgray(currentGray);
  22.     NXRectFill(r);    
  23.     PSsetgray(NX_BLACK);
  24.     NXFrameRect(r);
  25.     return self;
  26. }
  27. @end
  28.  
  29.