home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NeXT Education Software Sampler 1992 Fall
/
NeXT Education Software Sampler 1992 Fall.iso
/
Programming
/
Documents
/
OOPClass
/
Examples
/
ExtendDraw
/
Ellipse.bproj
/
Ellipse.m
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1992-06-26
|
487 b
|
34 lines
#import <appkit/appkit.h>
#import "Ellipse.h"
@implementation Ellipse:AShape
-drawShape
{
float rx,ry,cx,cy;
rx = bbox.size.width/2.0;
ry = bbox.size.height/2.0;
cx = bbox.origin.x+rx;
cy = bbox.origin.y+ry;
PSgsave();
PSsetlinewidth(0.0);
PStranslate(cx,cy);
PSscale(rx,ry);
PSnewpath();
PSarc(0.,0.,1.,0.,360.);
PSclosepath();
PSsetgray(shade);
if(fill)
PSfill();
else
PSstroke();
PSgrestore();
return self;
}
@end