ftp.nice.ch/pub/next/tools/screen/backspace/old/MovieSavers.tar.gz#/MovieSavers/Lines/LinesView.m

This is LinesView.m in view mode; [Download] [Up]

/*
 * Module:
 *	Lines
 *
 * Author:
 *	Doug "Kareth" McClure
 *	asd@cc.purdue.edu
 *	XASD@PURCCVM.BITNET
 *
 * Version: 1.0
*/

#import "LinesView.h"
#import "Thinker.h"
#import <appkit/NXImage.h>
#import <appkit/Window.h>
#import <appkit/Panel.h>                // for NXRunAlertPanel()
#import <dpsclient/wraps.h>
#import <libc.h>
#import <math.h>

#define getPos(X)	(randBetween(0,(X)))

@implementation LinesView

- oneStep
{
  // set color
  PSsethsbcolor(randBetween(0,1), 1.0, 1.0);

  // draw lines
  PSmoveto(getPos(xSize), getPos(ySize));
  PSlineto(getPos(xSize), getPos(ySize));
  PSstroke();

  return self;
}


- initFrame:(NXRect *)frameRect
{
  [super initFrame:frameRect];
  [self newSize];
  
  return self;
}


- sizeTo:(NXCoord)width :(NXCoord)height
{
  [super sizeTo:width :height];
  [self newSize];

  return self;
}


- newSize
{
  xSize=bounds.size.width;
  ySize=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.