func_graphics_max2d_drawoval.rst 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. .. _func_graphics_max2d_drawoval:
  2. ========
  3. DrawOval
  4. ========
  5. DrawOval -
  6. Description
  7. ===========
  8. .. code-block:: blitzmax
  9. DrawOval( x#,y#,width#,height# )
  10. Draw an oval
  11. #DrawOval draws an oval that fits in the rectangular area defined by @x, @y, @width
  12. and @height parameters.
  13. BlitzMax commands that affect the drawing of ovals include #SetColor, #SetHandle,
  14. #SetScale, #SetRotation, #SetOrigin, #SetViewPort, #SetBlend and #SetAlpha.
  15. Parameters
  16. ==========
  17. Return Values
  18. =============
  19. Nothing.
  20. Examples
  21. ========
  22. .. code-block:: blitzmax
  23. ' drawoval.bmx
  24. ' draws a pair of eyes using 4 DrawOval commands, 2 white, 2 blue
  25. ' positions the blue ovals so the eyes track the mouse
  26. Graphics 640,480
  27. While Not KeyHit(KEY_ESCAPE)
  28. Cls
  29. SetColor 255,255,255
  30. DrawOval 0,0,320,200
  31. DrawOval 320,0,320,200
  32. SetColor 0,0,255
  33. x=(MouseX()-320)/10
  34. y=(MouseY()-240)/10
  35. DrawOval 220-32+x,100+y,64,40
  36. DrawOval 420-32+x,100+y,64,40
  37. Flip
  38. Wend
  39. See Also
  40. ========