drawrect.bmx 444 B

12345678910111213141516171819202122232425
  1. ' drawrect.bmx
  2. ' draws a sequence of rectangles across the screen with
  3. ' increasing rotation and scale
  4. ' uses the frame variable to cycle through the values 0..9 for
  5. ' an animation effect between frames
  6. Graphics 640,480
  7. SetBlend ALPHABLEND
  8. SetAlpha 0.2
  9. While Not KeyHit(KEY_ESCAPE)
  10. Cls
  11. DrawText "DrawRect Example",0,0
  12. For r=t To t+500 Step 10
  13. SetRotation r
  14. SetScale r/5,r/5
  15. DrawRect r,r,2,2
  16. Next
  17. t=t+1
  18. If t=10 t=0
  19. Flip
  20. Wend