This is ResponseMeter.m in view mode; [Download] [Up]
#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
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.