Difference between revisions of "Paintutils.drawLine"
From ComputerCraft Wiki
(Small code fixes and changed colour to colours) |
m (The color argument is not typeof color, it's an int representing a color-API value.) |
||
Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=paintutils.drawLine | |name=paintutils.drawLine | ||
− | |args= | + | |args={{type|number}} startX, {{type|number}} startY, {{type|number}} endX, {{type|number}} endY, {{type|number}} [[colour (API)|colour]] |
|api=paintutils | |api=paintutils | ||
|returns=nil | |returns=nil |
Revision as of 00:35, 12 July 2013
Function paintutils.drawLine | |
Draw a line on the screen from (startX startY) to (endX endY) | |
Syntax | paintutils.drawLine(number startX, number startY, number endX, number endY, number colour) |
Returns | nil |
Part of | ComputerCraft |
API | paintutils |
Examples
Example | |
This code will draw a red line from the position (1, 2) to the position (9, 10) | |
Code |
paintutils.drawLine(1, 2, 9, 10, colours.red) |