This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Konlab's profile picture

How to use paintutils?

Started by Konlab, 17 May 2014 - 06:46 PM
Konlab #1
Posted 17 May 2014 - 08:46 PM
Please tell me how to use paintutils API?

thanks!
MKlegoman357 #2
Posted 17 May 2014 - 08:50 PM
Like any other CC or Lua APIs. You can find all of Paintutils API functions on the wiki.
Zudo #3
Posted 20 May 2014 - 05:45 PM

local image = paintutils.loadImage(path) -- Loads and returns an image object from a path.

paintutils.drawImage(image, 0, 0) -- Draws it at 0,0.

paintutils.drawPixel(0, 0, colours.red) -- Draws a red pixel at 0, 0

paintutils.drawLine(0, 0, 0, 10, colours.red)-- Draws a line from 0,0 to 0,10 in the red.
Edited on 20 May 2014 - 03:45 PM
Konlab #4
Posted 21 May 2014 - 07:09 AM

local image = paintutils.loadImage(path) -- Loads and returns an image object from a path.

paintutils.drawImage(image, 0, 0) -- Draws it at 0,0.

paintutils.drawPixel(0, 0, colours.red) -- Draws a red pixel at 0, 0

paintutils.drawLine(0, 0, 0, 10, colours.red)-- Draws a line from 0,0 to 0,10 in the red.

Thanks!