home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1997 March
/
VPR9703A.ISO
/
FFILLY
/
Kouza12
/
flower.tfy
< prev
next >
Wrap
Text File
|
1997-01-03
|
748b
|
29 lines
//flower.tfy DRAWサンプル2
main(){
int dot,pic,width,height;
int i;
int x1,y1,x2,y2;
real rd,r;
width=640;
height=480;
r=200.0;
rd=3.14159/180.0;
dot=LoadPic("1pixel.bmp");
pic=CreatePic(dot,width,height);
SetLineSize(1);
SetPaintColor(0xffffff);
DrawRect(pic,0,0,width,height);
SetPaintColor(0x000000);
DrawRect(pic,10,10,width-10,height-10);
SetPaintColor(0xffffff);
OpenWin(pic);
r=StrtoReal(StrInput("半径は?(50~230)"));
for(i=0;i<=360;i=i+5){
x1=RealtoInt(Cos(InttoReal(i)*rd)*r)+width/2;
y1=RealtoInt(Sin(InttoReal(i)*rd)*r)+height/2;
x2=RealtoInt(Cos(InttoReal(i+120)*rd)*r)+width/2;
y2=RealtoInt(Sin(InttoReal(i+120)*rd)*r)+height/2;
DrawLine(pic,x1,y1,x2,y2);
}
mes(LBDOWN){}
}