Annotation of Examples/AppKit/BackspaceViews/Bezier/BezierView.m, revision 1.1.1.1

1.1       root        1: #import "BezierView.h"
                      2: #import <appkit/Application.h>
                      3: #import "BezierWraps.h"
                      4: #import <dpsclient/wraps.h>
                      5: 
                      6: @implementation BezierView
                      7: 
                      8: + initialize
                      9: {
                     10:     if ( self == [BezierView class] )
                     11:        {
                     12:                // load PostScript procedures SpaceView needs
                     13:                // must be careful these are loaded into the correct context
                     14:                PSWbezierCreate();
                     15:     }
                     16:     return self;
                     17: }
                     18: 
                     19: - oneStep
                     20: {
                     21:        PSWbezierOneStep();
                     22:        return self;
                     23: }
                     24: 
                     25: - initFrame:(NXRect *)frameRect
                     26: {
                     27:        [super initFrame:frameRect];
                     28:        [self allocateGState];          // For faster lock/unlockFocus
                     29:        [self setClipping:NO];          // even faster...
                     30: 
                     31:        [self newSize];
                     32:        return self;
                     33: }
                     34: 
                     35: - sizeTo:(NXCoord)width :(NXCoord)height
                     36: {
                     37:        [super sizeTo:width :height];
                     38:        [self newSize];
                     39:        return self;
                     40: }
                     41: 
                     42: - drawSelf:(const NXRect *)rects :(int)rectCount
                     43: {
                     44:        if (!rects || !rectCount) return self;
                     45:        
                     46:        PSsetgray(0);
                     47:        //NXRectFill(rects);
                     48: 
                     49:        return self;
                     50: }
                     51: 
                     52: - newSize
                     53: {
                     54:        //this keeps the bezier size legal
                     55:        PSWbezierInit(bounds.size.width, bounds.size.height);
                     56:        return self;
                     57: }
                     58: 
                     59: @end

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.