Difference between revisions of "Paintutils.drawLine"

From ComputerCraft Wiki
Jump to: navigation, search
(Changed output.)
(Small code fixes and changed colour to colours)
Line 9: Line 9:
 
  |examples=
 
  |examples=
 
{{Example
 
{{Example
|desc=This code will draw a red line from the position (1, 2) to the position (3, 4)
+
|desc=This code will draw a red line from the position (1, 2) to the position (9, 10)
|code=line = [[paintutils.drawLine]](1, 2, 3, 4, [[colour (API)|colour]].red)
+
|code=[[paintutils.drawLine]](1, 2, 9, 10, [[colour (API)|colours]].red)
 
}}
 
}}
 
}}
 
}}
  
 
[[Category:API_Functions]]
 
[[Category:API_Functions]]

Revision as of 00:06, 12 July 2013


Grid Redstone.png  Function paintutils.drawLine
Draw a line on the screen from (startX startY) to (endX endY)
Syntax paintutils.drawLine(int startX, int startY, int endX, int endY, colour 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)