home *** CD-ROM | disk | FTP | other *** search
- #import "LineView.h"
-
- @implementation LineView
-
- - takeSliderInput:sender
- {
- xSlider = [sender floatValue];
- [self display];
- return self;
- }
-
-
- - drawSelf:(const NXRect*)r :(int)c
- {
- PSsetgray(NX_WHITE);
- NXRectFill(&bounds); //erase the present view
- PSsetgray(NX_BLACK);
- PSsetlinewidth(5.0);
- PSnewpath();
- PSmoveto(bounds.size.width/2.0, 10.0);
- PSlineto(xSlider*bounds.size.width, bounds.size.height - 10.0);
- PSstroke();
- return self;
- }
-
- @end
-