This is BezierViewPart.m in view mode; [Download] [Up]
#import "BezierViewPart.h" #import <appkit/Application.h> #import "BezierWraps.h" #import <dpsclient/wraps.h> @implementation BezierView + initialize { if ( self == [BezierView class] ) { // load PostScript procedures SpaceView needs // must be careful these are loaded into the correct context PSWbezierCreate(); } return self; } - oneStep { PSWbezierOneStep(); return self; } - initFrame:(NXRect *)frameRect { [super initFrame:frameRect]; [self allocateGState]; // For faster lock/unlockFocus [self setClipping:NO]; // even faster... [self newWindow]; return self; } - sizeTo:(NXCoord)width :(NXCoord)height { [super sizeTo:width :height]; [self newWindow]; return self; } - drawSelf:(const NXRect *)rects :(int)rectCount { if (!rects || !rectCount) return self; PSsetgray(0); //NXRectFill(rects); return self; } - newWindow { //this keeps the bezier size legal PSWbezierInit(bounds.size.width, bounds.size.height); return self; } @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.