Difference between revisions of "Paintutils.drawImage"
From ComputerCraft Wiki
(Fixes and clarifications) |
m (Int -> {{type|number}}) |
||
Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=paintutils.drawImage | |name=paintutils.drawImage | ||
− | |args=[[Table_(type)|table]] image handle, | + | |args=[[Table_(type)|table]] image handle, {{type|number}} x-position, {{type|number}} y-position |
|api=paintutils | |api=paintutils | ||
|returns=[[Boolean_(type)|boolean]] true on success, otherwise false. | |returns=[[Boolean_(type)|boolean]] true on success, otherwise false. |
Revision as of 00:38, 12 July 2013
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 |
Examples
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 |
image = paintutils.loadImage("bar") paintutils.drawImage(image, 3, 5) |