paintutils.drawFilledBox

From ComputerCraft
Jump to: navigation, search

paintutils.drawFilledBox
Function
Syntax
paintutils.drawFilledBox()
Returns nil
API paintutils
Source CC:Tweaked (source)

Draws a filled box on the current term from the specified start position to the specified end position. Accepts an optional colour argument, which defaults to the term's current background colour.

This function does not restore the original cursor position after being called. You may have to manually set it back with the term.setCursorPos function.
This function does not restore the original background colour after being called. You may have to manually set it back with the term.setBackgroundColour function.
ExampleExampleWith custom colour
Draws a filled red box from the top left corner of the current term to the bottom right corner.
Code
local width, height = term.getSize()
paintutils.drawFilledBox(1, 1, width, height, colours.red)
Output Demo paintutils.drawFilledBox.png