Code that paints on a drawing surface should be bracketed by calls to functions surface:begin() and and surface:theEnd(). Function surface:begin() return the drawing port descriptor than should be used to call painting functions.

Subsections

  1. surface:begin()
  2. surface:theEnd()
  3. surface:refresh()
  4. surface.width
  5. surface.height
  6. surface:close()
  7. surface:valid()
  8. surface:onResize(f)
  9. surface:write_to_png(filename)
  10. surface:toTensor()