home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 13 / CD_ASCQ_13_0494.iso / news / 768 / dmgraph.prg < prev    next >
Text File  |  1992-09-20  |  2KB  |  99 lines

  1. clearscrn()
  2. graphon()
  3. graphmode(0)
  4. mvxsize=graphstat("NUMXPIXELS")
  5. mvysize=graphstat("NUMYPIXELS")
  6. graphcolor(7)
  7. graphbox("clear",0,0,mvxsize-1,mvysize-1)
  8. graphbox("clear",50,30,mvxsize-30,mvysize-60)
  9. graphsay(02,30,7,"WIDGET SALES FOR 1992")
  10. graphsay(22,13,7,"1st qtr          2nd qtr          3rd qtr           4th qtr")
  11. graphsay(07,04,7,"T")
  12. graphsay(08,04,7,"h")
  13. graphsay(09,04,7,"o")
  14. graphsay(10,04,7,"u")
  15. graphsay(11,04,7,"s")
  16. graphsay(12,04,7,"a")
  17. graphsay(13,04,7,"n")
  18. graphsay(14,04,7,"d")
  19. graphsay(15,04,7,"s")
  20.  
  21. graphcolor(2)
  22. graphbox("solid",100,200,150,mvysize-61)
  23.  
  24. graphcolor(3)
  25. graphbox("solid",233,150,283,mvysize-61)
  26.  
  27. graphcolor(4)
  28. graphbox("solid",369,100,419,mvysize-61)
  29.  
  30. graphcolor(5)
  31. graphbox("solid",513,50,563,mvysize-61)
  32.  
  33. graphsay(24,02,7,"Press any key to continue...")
  34. inkey(0)
  35.  
  36. *****
  37. * Clear the graphics screen
  38. *****
  39. graphmode(0)
  40.  
  41. *****
  42. * Boxes
  43. *****
  44. graphcolor(7)
  45. graphbox("clear",0,0,mvxsize/2-1,mvysize/2-1)
  46. graphbox("clear",0,mvysize/2+1,mvxsize/2-1,mvysize-1)
  47. graphbox("clear",mvxsize/2+1,0,mvxsize-1,mvysize-1)
  48.  
  49. *****
  50. * Line graph
  51. *****
  52. graphcolor(2)
  53. graphbox("clear",20,20,300,150)
  54. graphcolor(3)
  55. graphline(40,140,280,40)
  56. graphcolor(4)
  57. graphline(40,120,280,60)
  58. graphcolor(5)
  59. graphline(40,100,280,80)
  60. graphsay(12,13,7,"Line Graph...")
  61.  
  62. *****
  63. * Graph text
  64. *****
  65. graphsay(05,45,1,"This is a sample of the text")
  66. graphsay(07,45,2,"that can be displayed on a")
  67. graphsay(09,45,3,"graphic screen.  Note how the")
  68. graphsay(11,45,4,"text color can be changed at will.")
  69. graphsay(13,45,5,"Placing text on a graphic screen is")
  70. graphsay(15,45,6,"is as easy as placing text on a")
  71. graphsay(17,45,7,"text screen. Here is a command:")
  72. graphsay(20,45,2,"    GRAPHSAY(10,15,7,'HELLO')")
  73.  
  74. *****
  75. * circles
  76. *****
  77. mvsx=40
  78. mvsy=200
  79. mvex=280
  80. mvey=320
  81. mvcolor=1
  82. do while .t.
  83.     graphcolor(mvcolor)
  84.     graphcirc("solid",mvsx,mvsy,mvex,mvey)
  85.     mvcolor=mvcolor+1
  86.     if mvcolor>15
  87.         mvcolor=1
  88.     endif
  89.     
  90.     mvkey=inkey()
  91.     if mvkey=27
  92.         exit
  93.     endif
  94. enddo
  95. graphoff()
  96. return
  97.  
  98.  
  99.