paintutils.drawImage

From ComputerCraft Wiki
Revision as of 15:57, 10 April 2014 by MKlegoman357 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Grid Redstone.png  Function paintutils.drawImage
Draws an image whose top left corner is at x and y coordinates (images created with the paint program, then loaded using paintutils.loadImage).
Syntax paintutils.drawImage(table image, number x, number y)
Returns boolean was the image printed successfully?
Part of ComputerCraft
API paintutils

Examples

Grid paper.png  Example
The program loads the image 'bar' (using paintutils.loadImage) onto the variable 'image', and then draws it on the screen, starting at position {3, 5}.
Code
local image = paintutils.loadImage("bar")
paintutils.drawImage(image, 3, 5)