home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Education Sampler 1992 [NeXTSTEP]
/
Education_1992_Sampler.iso
/
NeXT
/
GnuSource
/
Chess-9
/
ResponseMeter.m
< prev
next >
Wrap
Text File
|
1992-03-07
|
770b
|
53 lines
#import <appkit/appkit.h>
#import "ResponseMeter.h"
#import "gnuchess.h"
@implementation ResponseMeter
- displayFilled
{
[self lockFocus];
PSgsave();
PSsetgray( NX_WHITE );
PSclippath();
PSfill();
PSsetlinewidth( 2.0 );
PSsetgray( NX_BLACK );
PSclippath();
PSstroke();
PSgrestore();
PSflushgraphics();
NXPing();
[self unlockFocus];
}
- drawSelf:(const NXRect *)f :(int)rectCount
{
PSgsave();
PSsetgray( 0.5 );
PSclippath();
PSfill();
if( (ResponseTime+ExtraTime) ){
PSsetgray( NX_WHITE );
PSrectfill( 0.0, 0.0,
et*(f->size.width/(ResponseTime+ExtraTime)), f->size.height );
}
PSsetlinewidth( 2.0 );
PSsetgray( NX_BLACK );
PSclippath();
PSstroke();
PSgrestore();
}
@end