graphic
Deprecated
use blit.
The graphic library is a wrapper around paintutils.
drawFilledBox(x, y, x2, y2, colour, output) | drawFilledBox draws a filled in box at the specified coordinates |
---|---|
drawBox(x, y, x2, y2, colour, output) | drawBox draws a hollow box at the specified coordinates |
drawPixel(x, y, colour, output) | drawPixel draws a single pixel at the specified coordinates |
drawText(x, y, fg, bg, text, output) | drawText draws a textline with set colours |
drawLine(x1, y2, x2, y2, colour, output) | drawLine draws a line between the two coordinates |
- drawFilledBox(x, y, x2, y2, colour, output)Source
drawFilledBox draws a filled in box at the specified coordinates
Parameters
- x number topleft x coordinate of the box
- y number topleft y coordinate of the box
- x2 number bottomright x coordinate of the box
- y2 number bottomright y coordinate of the box
- colour number colour of the box
- output table output terminal of the box
- drawBox(x, y, x2, y2, colour, output)Source
drawBox draws a hollow box at the specified coordinates
Parameters
- x number topleft x coordinate of the box
- y number topleft y coordinate of the box
- x2 number bottomright x coordinate of the box
- y2 number bottomright y coordinate of the box
- colour number colour of the box
- output table output terminal of the box
- drawPixel(x, y, colour, output)Source
drawPixel draws a single pixel at the specified coordinates
Parameters
- x number x coordinate of the pixel
- y number y coordinate of the pixel
- colour number colour of the pixel
- output table output terminal of the pixel
- drawText(x, y, fg, bg, text, output)Source
drawText draws a textline with set colours
Parameters
- drawLine(x1, y2, x2, y2, colour, output)Source
drawLine draws a line between the two coordinates
Parameters
- x1 number x coordinate of one end
- y2 number y coordinate of one end
- x2 number x coordinate of the other end
- y2 number y coordinate of the other end
- colour number colour of the line
- output table output terminal of the line