Difference between revisions of "Paintutils.drawLine"
From ComputerCraft Wiki
MKlegoman357 (Talk | contribs) m (Expanded) |
|||
Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=paintutils.drawLine | |name=paintutils.drawLine | ||
− | |args={{type|number}} startX, {{type|number}} startY, {{type|number}} endX, {{type|number}} endY | + | |args={{type|number}} startX, {{type|number}} startY, {{type|number}} endX, {{type|number}} endY, {{type|number}} [[color (API)|color]] |
|api=paintutils | |api=paintutils | ||
|returns=None | |returns=None |
Revision as of 13:04, 25 April 2014
Function paintutils.drawLine | |
Draws a line on the screen starting from startX and startY and ending at endX and endY. If color is specified then uses that color, otherwise uses last color set by term.setBackgroundColor. | |
Syntax | paintutils.drawLine(number startX, number startY, number endX, number endY, number color) |
Returns | None |
Part of | ComputerCraft |
API | paintutils |
Examples
Example | |
Draws a red line from the position (1, 2) to the position (9, 10). | |
Code |
paintutils.drawLine(1, 2, 9, 10, colors.red) |