func_graphics_max2d_cls.rst 695 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. .. _func_graphics_max2d_cls:
  2. ===
  3. Cls
  4. ===
  5. Cls -
  6. Description
  7. ===========
  8. .. code-block:: blitzmax
  9. Cls()
  10. Clear graphics buffer
  11. Clears the graphics buffer to the current cls color as determined by #SetClsColor.
  12. Parameters
  13. ==========
  14. Return Values
  15. =============
  16. Nothing.
  17. Examples
  18. ========
  19. .. code-block:: blitzmax
  20. ' cls.bmx
  21. ' a spinning text message
  22. ' remove the call to cls to illustrate the
  23. ' need for clearing the screen every frame
  24. Graphics 640,480
  25. SetOrigin 320,240
  26. While Not KeyHit(KEY_ESCAPE)
  27. Cls
  28. SetRotation frame
  29. DrawText "Press Escape To Exit",0,0
  30. Flip
  31. frame:+1
  32. Wend
  33. See Also
  34. ========