paintutils.drawLine

From ComputerCraft Wiki
Revision as of 00:35, 12 July 2013 by AfterLifeLochie (Talk | contribs) (The color argument is not typeof color, it's an int representing a color-API value.)

Jump to: navigation, search


Grid Redstone.png  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

Grid paper.png  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)