paintutils.drawBox

From ComputerCraft Wiki
Revision as of 19:40, 29 January 2015 by MKlegoman357 (Talk | contribs) (Removed misinformation. It's allowed to exchange startX and endX values, but not startY and endY. For simplicity didn't add this in.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


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)