From ComputerCraft Wiki
Revision as of 00:38, 12 July 2013 by AfterLifeLochie (Talk | contribs) (Int -> {{type|number}})

Jump to: navigation, search

Grid Redstone.png  Function paintutils.drawImage
Draws an image whose top left corner is at x and y (images created with the paint program, then loaded using paintutils.loadImage).
Syntax paintutils.drawImage(table image handle, number x-position, number y-position)
Returns boolean true on success, otherwise false.
Part of ComputerCraft
API paintutils


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}.
image = paintutils.loadImage("bar")
paintutils.drawImage(image, 3, 5)