Skip to content

DrawingPrimitives

[Source]

Utility functions for drawing common shapes into cell arrays. All functions are tag so they can be called inside recover blocks.

primitive val DrawingPrimitives

Constructors

create

[Source]

new val create()
: DrawingPrimitives val^

Returns


Public Functions

draw_box

[Source]

Draw a single-line box border into a cell array. The box is placed at the top-left of the grid. grid_width is the row stride for indexing.

fun box draw_box(
  cells: Array[Cell val] ref,
  grid_width: USize val,
  grid_height: USize val,
  box_width: USize val,
  box_height: USize val,
  color: (Default val | Black val | Red val | 
    Green val | Yellow val | Blue val | 
    Magenta val | Cyan val | White val | 
    BrightBlack val | BrightRed val | BrightGreen val | 
    BrightYellow val | BrightBlue val | BrightMagenta val | 
    BrightCyan val | BrightWhite val | Rainbow val) = reference)
: None val

Parameters

Returns


eq

[Source]

fun box eq(
  that: DrawingPrimitives val)
: Bool val

Parameters

Returns


ne

[Source]

fun box ne(
  that: DrawingPrimitives val)
: Bool val

Parameters

Returns