home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windows CE - The Ultimate Companion
/
ROMMAN_CE.iso
/
Files
/
Programming
/
Basice
/
GRTEST.BAS
< prev
next >
Wrap
BASIC Source File
|
1997-03-14
|
2KB
|
103 lines
call clrscr
print "Cursor positioning test"
loop for i%=1 to 10
call curpos(i%*2,i%)
print i%
endloop
!call pause("Press any key to continue")
wait 1.5
call clrscr
print "Testing point plot"
call color(3)
loop for i%=0 to 470 step 20
loop for j%=0 to 170 step 20
call point(i%,j%)
endloop
endloop
!call pause("Press any key to continue")
wait 1.5
print
call clrscr
print "Testing line drawing"
call color(3)
loop for i%=1 to 186 step 2
call line(0,i%,479,186-i%)
endloop
!call pause("Press any key to continue")
wait 1.5
print
call curpos(0,0)
print "Testing rectangle fill"
call color(0)
call fillrect(10,50,50,100)
!call pause("Press any key to continue")
wait 1.5
print
call clrscr
print "Plot test"
call gr_init
call gr_setwin(50,200,1,91)
call gr_setscale(0,7,-1,1)
call gr_xaxis(0,7,1,5,0,8,8)
call gr_xaxis(0,7,1,5,-1,0,8)
call gr_xaxis(0,7,1,5,1,8,0)
call gr_yaxis(-1,1,0.5,2,0,0,8)
call gr_yaxis(-1,1,0.5,2,7,8,0)
t# = 0
pen% = 0
loop
while t# < 6.28
y#=sin(t#)
call gr_plot(t#,y#,pen%)
pen%=1
t# = t#+0.1
endloop
call gr_setwin(250,400,1,91)
call gr_setscale(0,7,-1,1)
call gr_xaxis(0,7,1,5,0,8,8)
call gr_xaxis(0,7,1,5,-1,0,8)
call gr_xaxis(0,7,1,5,1,8,0)
call gr_yaxis(-1,1,0.5,2,0,0,8)
call gr_yaxis(-1,1,0.5,2,7,8,0)
t# = 0
pen% = 0
loop
while t# < 6.28
y#=cos(t#)
call gr_plot(t#,y#,pen%)
pen%=1
t# = t#+0.1
endloop
call pause("Press any key to continue")
print