Advertisement
BlackDragon_B

draw

Mar 29th, 2020
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. os.loadAPI("image")
  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