Paintutils (API)

From ComputerCraft Wiki
Revision as of 21:48, 14 September 2013 by Immibis (Talk | contribs) (use API table template)

Jump to: navigation, search

Paintutils is a default API for advanced computers which can draw pixels and lines, and load and draw image files.

Grid disk.png  Paintutils (API)
Function Return values Description
paintutils.loadImage(string path) table image Returns an image object from path.
paintutils.drawImage(table image, number x, number y) nil Draws an image at (x, y) where image is an image object.
paintutils.drawPixel(number x, number y, number colour) nil Draws a pixel at (x, y) in the specified colour.
paintutils.drawLine(number startX, number startY, number endX, number endY, number color) nil Draws a line from (startX, startY) to (endX, endY) in the specified colour.