Difference between revisions of "Paintutils.drawBox"

From ComputerCraft Wiki
Jump to: navigation, search
(Created the page for the missing function)
 
(Removed misinformation. It's allowed to exchange startX and endX values, but not startY and endY. For simplicity didn't add this in.)
 
Line 7: Line 7:
 
|addon=ComputerCraft
 
|addon=ComputerCraft
 
|desc=Draws a box from (startX, startY) to (endX, endY) in the specified color. ''Requires version 1.64 or newer.''
 
|desc=Draws a box from (startX, startY) to (endX, endY) in the specified color. ''Requires version 1.64 or newer.''
<br/>
 
(<var>startX</var>, <var>startY</var>) is the corner opposite to (<var>endX</var>, <var>endY</var>). ie.: if (<var>startX</var>, <var>startY</var>) indicates the top-left corner then (<var>endX</var>, <var>endY</var>) would indicate the bottom-right corner.
 
 
|examples=
 
|examples=
 
{{Example
 
{{Example

Latest revision as of 19:40, 29 January 2015


Grid Redstone.png  Function paintutils.drawBox
Draws a box from (startX, startY) to (endX, endY) in the specified color. Requires version 1.64 or newer.
Syntax paintutils.drawBox(number startX, number startY, number endX, number endY [, number color])
Returns None
Part of ComputerCraft
API paintutils

Examples

Grid paper.png  Example
Draws a lime box which's top-left corner is at (2, 3) and bottom-right corner is at (10, 7).
Code
paintutils.drawBox(2, 3, 10, 7, colors.lime)