home *** CD-ROM | disk | FTP | other *** search
/ Game Programming for Teens / GameProgrammingForTeens.iso / Source / chapter06 / demo06-04.bb < prev    next >
Encoding:
Text File  |  2003-04-06  |  644 b   |  34 lines

  1. ;;;;;;;;;;;;;;;;;;
  2. ;GPFK06-04.bb
  3. ;By Maneesh Sethi
  4. ;Demonstrates CreateImage
  5. ;No Input Parameters Required
  6. ;;;;;;;;;;;;;;;;;;
  7.  
  8. ;Set up graphics mode
  9. Graphics 800,600 
  10.  
  11. ;Set automidhandle to true
  12. AutoMidHandle True
  13.  
  14. ;create the blank image
  15. wallimg = CreateImage(200,200) 
  16.  
  17. ;set the buffer to the image
  18. SetBuffer ImageBuffer(wallimg) 
  19.  
  20. ;make the color white
  21. Color 255,255,255 
  22.  
  23. ;draw a rectangle from topleft to bottomright of buffer
  24. Rect 0,0,200,200 
  25.  
  26. ;switch back to front buffer
  27. SetBuffer FrontBuffer() 
  28.  
  29. ;draw the image buffer
  30. DrawImage wallimg,400,300 
  31.  
  32.  
  33. ;wait for user To press a key Before exiting
  34. WaitKey