Skip to content

TerminalDrawing

[Source]

Defines convenient helper functions for drawing shapes in the terminal

trait ref TerminalDrawing

Public Functions

hline

[Source]

Draw a horizontal line (row) using any character

fun box hline(
  width: U32 val,
  fill: String val)
: String val

Parameters

Returns


vline

[Source]

Draw a vertical line (column) using any character

fun box vline(
  height: U32 val,
  fill: String val)
: String val

Parameters

Returns


fill_rectangle

[Source]

Fill a rectangular area with any character

fun box fill_rectangle(
  width: U32 val,
  height: U32 val,
  fill: String val)
: String val

Parameters

Returns


frame_hline

[Source]

Draw a horizontal line using a line style.

fun box frame_hline(
  width: U32 val,
  style: GridChars val = reference)
: String val

Parameters

Returns


frame_vline

[Source]

Draw a vertical line using a line style.

fun box frame_vline(
  height: U32 val,
  style: GridChars val = reference)
: String val

Parameters

Returns


frame

[Source]

Draw a rectangle using a line style (default is single solid line) with option to clear the space within the rectangle.

fun box frame(
  width: U32 val,
  height: U32 val,
  style: GridChars val = reference,
  clear: Bool val = false)
: String val

Parameters

Returns