drawrect.bmx 481 B

12345678910111213141516171819202122232425262728
  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. SuperStrict
  7. Graphics 640,480
  8. SetBlend ALPHABLEND
  9. SetAlpha 0.2
  10. Local t:Int
  11. While Not KeyHit(KEY_ESCAPE)
  12. Cls
  13. DrawText "DrawRect Example",0,0
  14. For Local r:Int = t To t+500 Step 10
  15. SetRotation r
  16. SetScale r/5,r/5
  17. DrawRect r,r,2,2
  18. Next
  19. t=t+1
  20. If t=10 t=0
  21. Flip
  22. Wend