Difference between revisions of "Paintutils (API)"

From ComputerCraft Wiki
Jump to: navigation, search
m (Methods fix, shit was all over the place.)
Line 6: Line 6:
 
!style="background:#EEE" width="*"|Description
 
!style="background:#EEE" width="*"|Description
 
|-
 
|-
|[[paintutils.loadImage]]( path )
+
|[[paintutils.loadImage]](path)
 
|Returns an image object.
 
|Returns an image object.
 
|-
 
|-
|[[paintutils.drawImage]]( image,x,y)
+
|[[paintutils.drawImage]](image, x, y)
|Draws an image at x,y, where image is an image object.
+
|Draws an image at (x, y) where image is an image object.
 
|-
 
|-
|[[paintutils.drawPixel]]( x,y,colour )
+
|[[paintutils.drawPixel]](x, y, colour)
|Draws a pixel at x,y in the colour specified.
+
|Draws a pixel at (x, y) in the colour specified.
 
|-
 
|-
|[[paintutils.drawLine]]( startX,startY,endX,endY,colour )
+
|[[paintutils.drawLine]](startX, startY, endX, endY, colour)
|Draws a line from startX,startY to endX,endY in the colour specified.
+
|Draws a line from (startX, startY) to (endX, endY) in the colour specified.
  
 
[[Category:APIs]]
 
[[Category:APIs]]

Revision as of 08:33, 25 November 2012

Paintutils is an API to draw and load images

Methods

Method name Description
paintutils.loadImage(path) Returns an image object.
paintutils.drawImage(image, x, y) Draws an image at (x, y) where image is an image object.
paintutils.drawPixel(x, y, colour) Draws a pixel at (x, y) in the colour specified.
paintutils.drawLine(startX, startY, endX, endY, colour) Draws a line from (startX, startY) to (endX, endY) in the colour specified.