home *** CD-ROM | disk | FTP | other *** search
/ Windows CE - The Ultimate Companion / ROMMAN_CE.iso / Files / Programming / Basice / GRTEST.BAS < prev    next >
BASIC Source File  |  1997-03-14  |  2KB  |  103 lines

  1.  
  2. call clrscr
  3. print "Cursor positioning test"
  4.  
  5. loop for i%=1 to 10
  6.    call curpos(i%*2,i%)
  7.    print i%
  8.    endloop
  9.  
  10. !call pause("Press any key to continue")
  11. wait 1.5
  12.  
  13.  
  14.  
  15. call clrscr
  16. print "Testing point plot"
  17. call color(3)
  18.  
  19. loop for i%=0 to 470 step 20
  20. loop for j%=0 to 170 step 20
  21.    call point(i%,j%)
  22.    endloop
  23.    endloop
  24.  
  25. !call pause("Press any key to continue")
  26. wait 1.5
  27. print
  28.  
  29.  
  30.  
  31. call clrscr
  32. print "Testing line drawing"
  33. call color(3)
  34.  
  35. loop for i%=1 to 186 step 2
  36.    call line(0,i%,479,186-i%)
  37.    endloop
  38.  
  39. !call pause("Press any key to continue")
  40. wait 1.5
  41. print
  42.  
  43. call curpos(0,0)
  44. print "Testing rectangle fill"
  45.  
  46. call color(0)
  47. call fillrect(10,50,50,100)
  48.  
  49.  
  50.  
  51. !call pause("Press any key to continue")
  52. wait 1.5
  53. print
  54.  
  55. call clrscr
  56. print "Plot test"
  57. call gr_init
  58. call gr_setwin(50,200,1,91)
  59. call gr_setscale(0,7,-1,1)
  60.  
  61. call gr_xaxis(0,7,1,5,0,8,8)
  62. call gr_xaxis(0,7,1,5,-1,0,8)
  63. call gr_xaxis(0,7,1,5,1,8,0)
  64.  
  65. call gr_yaxis(-1,1,0.5,2,0,0,8)
  66. call gr_yaxis(-1,1,0.5,2,7,8,0)
  67.  
  68. t# = 0
  69. pen% = 0
  70. loop
  71.   while t# < 6.28
  72.   y#=sin(t#)
  73.   call gr_plot(t#,y#,pen%)
  74.   pen%=1
  75.   t# = t#+0.1
  76.   endloop
  77.  
  78. call gr_setwin(250,400,1,91)
  79. call gr_setscale(0,7,-1,1)
  80.  
  81. call gr_xaxis(0,7,1,5,0,8,8)
  82. call gr_xaxis(0,7,1,5,-1,0,8)
  83. call gr_xaxis(0,7,1,5,1,8,0)
  84.  
  85. call gr_yaxis(-1,1,0.5,2,0,0,8)
  86. call gr_yaxis(-1,1,0.5,2,7,8,0)
  87.  
  88. t# = 0
  89. pen% = 0
  90. loop
  91.   while t# < 6.28
  92.   y#=cos(t#)
  93.   call gr_plot(t#,y#,pen%)
  94.   pen%=1
  95.   t# = t#+0.1
  96.   endloop
  97.  
  98. call pause("Press any key to continue")
  99. print
  100.  
  101.  
  102.  
  103.