Difference between revisions of "Paintutils.loadImage"

From ComputerCraft Wiki
Jump to: navigation, search
(Created page with " Paintutils.loadImage returns an image object == Usage == <code> foo = paintutils.loadImage("bar") -- Loads image "bar" as "foo"<br/> paintutils.drawImage(bar, 1, 1) -- Draws...")
 
Line 1: Line 1:
 
+
{{lowercase}}
Paintutils.loadImage returns an image object
+
{{Function
 
+
|name=paintutils.loadImage
== Usage ==
+
|args=( path )
<code>
+
|api=paintutils
foo = paintutils.loadImage("bar") -- Loads image "bar" as "foo"<br/>
+
|returns=True or false
paintutils.drawImage(bar, 1, 1) -- Draws "bar"
+
|addon=ComputerCraft
</code>
+
|desc=Loads an image created with the built in Advanced Computer program paint.
 +
|examples=
 +
{{Example
 +
|desc=The program loads the image 'bar' onto the variable 'foo' and then shows it on screen:
 +
|code=foo = paintutils.loadImage("bar")
 +
[[paintutils.drawImage]](foo)
 +
}}
 +
}}

Revision as of 13:59, 17 November 2012


Grid Redstone.png  Function paintutils.loadImage
Loads an image created with the built in Advanced Computer program paint.
Syntax paintutils.loadImage(( path ))
Returns True or false
Part of ComputerCraft
API paintutils

Examples

Grid paper.png  Example
The program loads the image 'bar' onto the variable 'foo' and then shows it on screen:
Code
foo = paintutils.loadImage("bar")

paintutils.drawImage(foo)