2
0

func_graphics_max2d_plot.rst 847 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. .. _func_graphics_max2d_plot:
  2. ====
  3. Plot
  4. ====
  5. Plot -
  6. Description
  7. ===========
  8. .. code-block:: blitzmax
  9. Plot( x#,y# )
  10. Plot a pixel
  11. Sets the color of a single pixel on the back buffer to the current drawing color
  12. defined with the #SetColor command. Other commands that affect the operation of
  13. #Plot include #SetOrigin, #SetViewPort, #SetBlend and #SetAlpha.
  14. Parameters
  15. ==========
  16. Return Values
  17. =============
  18. Nothing.
  19. Examples
  20. ========
  21. .. code-block:: blitzmax
  22. ' plot.bmx
  23. ' plots a cosine graph
  24. ' scrolls along the graph using an incrementing frame variable
  25. Graphics 640,480
  26. While Not KeyHit(KEY_ESCAPE)
  27. Cls
  28. For x=0 To 640
  29. theta=x+frame
  30. y=240-Cos(theta)*240
  31. Plot x,y
  32. Next
  33. frame=frame+1
  34. Flip
  35. Wend
  36. See Also
  37. ========