Difference between revisions of "Paintutils (API)"

From ComputerCraft Wiki
Jump to: navigation, search
m (Added a period. Blegh grammar.)
m (Added types)
Line 11: Line 11:
 
<tr><td style="width: 350px; background: #E0E0E0; padding: .4em; font-weight:bold;">Method Name</td><td style="background: #E0E0E0; padding: .4em; font-weight:bold;">Description</td></tr>
 
<tr><td style="width: 350px; background: #E0E0E0; padding: .4em; font-weight:bold;">Method Name</td><td style="background: #E0E0E0; padding: .4em; font-weight:bold;">Description</td></tr>
  
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">[[paintutils.loadImage]](path)</td>
+
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">[[paintutils.loadImage]]({{type|string}} path)</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns an image object.</td></tr>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns an image object.</td></tr>
  
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">[[paintutils.drawImage]](image, x, y)</td>
+
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">[[paintutils.drawImage]](image, {{type|int}} x, {{type|int}} y)</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Draws an image at (x, y) where image is an image object.</td></tr>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Draws an image at (x, y) where image is an image object.</td></tr>
  
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">[[paintutils.drawPixel]](x, y, colour)</td>
+
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">[[paintutils.drawPixel]]({{type|int}} x, {{type|int}} y, {{type|int}} colour)</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Draws a pixel at (x, y) in the colour specified.</td></tr>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Draws a pixel at (x, y) in the colour specified.</td></tr>
  
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">[[paintutils.drawLine]](startX, startY, endX, endY, colour)</td>
+
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">[[paintutils.drawLine]]({{type|int}} startX, {{type|int}} startY, {{type|int}} endX, {{type|int}} endY, {{type|int}} color)</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Draws a line from (startX, startY) to (endX, endY) in the colour specified.</td></tr>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Draws a line from (startX, startY) to (endX, endY) in the colour specified.</td></tr>
  

Revision as of 15:13, 2 May 2013

This page needs some serious TLC, stat!
Please help us by cleaning it, fixing it up, or sparing it some love.
(Reason: Function pages are added. When the time is appropriate, whoever deems that time, may take this NeedsWork template down SuicidalSTDz 20:40, 29 March 2013 (MSK))

Paintutils is an API to draw and load images.

Grid disk.png   Paintutils (API)

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