NielsUtrecht

gfxtest

Sep 9th, 2013
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. if(not os.loadAPI("hydraApi")) then
  2.     error("Could not load hydraApi")
  3. end
  4.  
  5. if(not os.loadAPI("hydraGfxApi")) then
  6.     error("Could not load hydraGfxApi")
  7. end
  8.  
  9. local monitor = hydraApi.getMonitor()
  10.  
  11. local buffer = hydraGfxApi.createBuffer(10,10)
  12.  
  13. hydraGfxApi.setPixel(buffer, 1, 1, colors.red)
  14. hydraGfxApi.setPixel(buffer, 2, 2, colors.green)
  15. hydraGfxApi.setPixel(buffer, 3, 3, colors.blue)
  16.  
  17. hydraGfxApi.drawToMonitor(buffer, monitor)
Advertisement
Add Comment
Please, Sign In to add comment