/*  
** Copyright (c) 1995 Friday Software & Consulting, Inc.  All Rights Reserved.
**
** Author: <bbum@friday.com>
**
** Do not take this code seriously.
*/

/*  This object is included in the MiscKit by permission from the author
**  and its use is governed by the MiscKit license, found in the file
**  "LICENSE.rtf" in the MiscKit distribution.  Please refer to that file
**  for a list of all applicable permissions and restrictions.
*/

#import <appkit/appkit.h>
#import "FooFaraw.h"
    #import "ScaledView.h"

@implementation FooFaraw : View
- (BOOL) advancedCommandSet {return YES;}
- (BOOL) ignoreMouseMovement {return YES;}

- commandKey
{
  bigMode = (bigMode ? NO : YES);
  return self;
}


- initFrame:(const NXRect *)frameRect
{
  [super initFrame:frameRect];
  [self newSize];
  winNum=[[self window] windowNum];
  return self;
}

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

- newSize
{
  urx=bounds.size.width;
  ury=bounds.size.height;
  
  midx=urx/2;
  midy=ury/2;

  n = 0;
  t = 0;
  
  // phases of the three points;
  p1=0;
  p2=(4*M_PI)/3;
  p3=(2*M_PI)/3;
  
  // starting angle of each point;
  t1[0]=0;
  t2[0]=p2;
  t3[0]=p3;


  // s1 and s2 should define an oval that takes up middle 75% of the screen
  s1 = midx*0.5; s2 = midy*0.5;
  s3 = midx*0.5; s4 = midy*0.5;

  n=lper;
  p=(lper/3)*2;
  pp=(lper/3);

  return self;
}

- drawSelf:(const NXRect *)rects :(int) counts
{
    PSsetgray(0.0);
    NXRectFill(&bounds);
    return self;
}
@end


