Difference between revisions of "Paintutils (API)"
From ComputerCraft Wiki
m (→Methods fix, shit was all over the place.) |
(Updated to API overview v2) |
||
Line 1: | Line 1: | ||
Paintutils is an API to draw and load images | Paintutils is an API to draw and load images | ||
− | = | + | <table style="width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;"> |
− | + | <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]] | |
− | + | Paintutisl (API) | |
− | + | </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> | |
− | + | <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> | |
− | + | <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> | |
− | + | <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> | ||
+ | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">Draws a line from (startX, startY) to (endX, endY) in the colour specified.</td></tr> | ||
+ | |||
+ | </table> | ||
+ | |||
[[Category:APIs]] | [[Category:APIs]] |
Revision as of 22:19, 30 November 2012
Paintutils is an API to draw and load images
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. |