setViewport.lua 782 B

1234567891011121314151617181920212223242526272829303132
  1. return {
  2. summary = 'Set the viewport of the layer.',
  3. description = [[
  4. Sets the viewport of the layer. The viewport is a 2D region of pixels that the layer will
  5. display within its plane.
  6. ]],
  7. arguments = {
  8. x = {
  9. type = 'number',
  10. description = 'The x coordinate of the upper-left corner of the viewport.',
  11. },
  12. y = {
  13. type = 'number',
  14. description = 'The y coordinate of the upper-left corner of the viewport.',
  15. },
  16. w = {
  17. type = 'number',
  18. description = 'The width of the viewport, in pixels.',
  19. },
  20. h = {
  21. type = 'number',
  22. description = 'The height of the viewport, in pixels.',
  23. }
  24. },
  25. returns = {},
  26. variants = {
  27. {
  28. arguments = { 'x', 'y', 'w', 'h' },
  29. returns = {}
  30. }
  31. }
  32. }