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

  1. x number topleft x coordinate of the box
  2. y number topleft y coordinate of the box
  3. x2 number bottomright x coordinate of the box
  4. y2 number bottomright y coordinate of the box
  5. colour number colour of the box
  6. 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

  1. x number topleft x coordinate of the box
  2. y number topleft y coordinate of the box
  3. x2 number bottomright x coordinate of the box
  4. y2 number bottomright y coordinate of the box
  5. colour number colour of the box
  6. output table output terminal of the box
drawPixel(x, y, colour, output)Source

drawPixel draws a single pixel at the specified coordinates

Parameters

  1. x number x coordinate of the pixel
  2. y number y coordinate of the pixel
  3. colour number colour of the pixel
  4. output table output terminal of the pixel
drawText(x, y, fg, bg, text, output)Source

drawText draws a textline with set colours

Parameters

  1. x number x coordinate of the start of the text
  2. y number y coordinate of the start of the text
  3. fg number colour of the text
  4. bg number background colour of the text
  5. text string the text to write
  6. output table output terminal of the text
drawLine(x1, y2, x2, y2, colour, output)Source

drawLine draws a line between the two coordinates

Parameters

  1. x1 number x coordinate of one end
  2. y2 number y coordinate of one end
  3. x2 number x coordinate of the other end
  4. y2 number y coordinate of the other end
  5. colour number colour of the line
  6. output table output terminal of the line