setPixel.lua 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. return {
  2. summary = 'Set the value of a pixel of the TextureData.',
  3. description = 'Sets the value of a pixel of the TextureData.',
  4. arguments = {
  5. {
  6. name = 'x',
  7. type = 'number',
  8. description = 'The x coordinate of the pixel to set (0-indexed).'
  9. },
  10. {
  11. name = 'y',
  12. type = 'number',
  13. description = 'The y coordinate of the pixel to set (0-indexed).'
  14. },
  15. {
  16. name = 'r',
  17. type = 'number',
  18. description = 'The red component of the pixel, from 0.0 to 1.0.'
  19. },
  20. {
  21. name = 'g',
  22. type = 'number',
  23. description = 'The green component of the pixel, from 0.0 to 1.0.'
  24. },
  25. {
  26. name = 'b',
  27. type = 'number',
  28. description = 'The blue component of the pixel, from 0.0 to 1.0.'
  29. },
  30. {
  31. name = 'a',
  32. type = 'number',
  33. default = '1.0',
  34. description = 'The alpha component of the pixel, from 0.0 to 1.0.'
  35. }
  36. },
  37. returns = {},
  38. notes = [[
  39. The following texture formats are supported: `rgba`, `rgb`, `r32f`, `rg32f`, and `rgba32f`.
  40. ]],
  41. related = {
  42. 'TextureData:getPixel',
  43. 'Texture:replacePixels',
  44. 'TextureFormat'
  45. }
  46. }