Advertisement
Guest User

draw.lua

a guest
Feb 24th, 2020
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.36 KB | None | 0 0
  1. os.loadAPI("image2.lua")
  2.  
  3. local screen = peripheral.find("monitor") or term
  4.  
  5. screen.setTextScale(.5)
  6. screen.setCursorPos(1,1)
  7.  
  8. local ix, iy = image.getSize()
  9. local sx, sy = screen.getSize()
  10. if (sx<ix) or (sy<iy) then
  11.     printError("Warning, image larger than screen")
  12. end
  13. print("Drawing a", ix, iy, "image on a", sx, sy, "screen")
  14. image.draw(screen)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement