Difference between revisions of "Paintutils (API)"

From ComputerCraft Wiki
Jump to: navigation, search
(Updated to API overview v2)
m (Hilarious typo is hilarious. :P)
Line 4: Line 4:
 
<tr><td colspan="2" style="font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid #C9C9C9 1px; background: #D3FFC2; line-height:28px;">
 
<tr><td colspan="2" style="font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid #C9C9C9 1px; background: #D3FFC2; line-height:28px;">
 
[[File:Grid_disk.png|24px]]&nbsp;&nbsp;
 
[[File:Grid_disk.png|24px]]&nbsp;&nbsp;
Paintutisl (API)
+
Paintutils (API)
 
</td></tr>
 
</td></tr>
  

Revision as of 22:54, 30 November 2012

Paintutils is an API to draw and load images

Grid disk.png   Paintutils (API)

Method NameDescription
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.