DrawingPrimitives¶
Utility functions for drawing common shapes into cell arrays.
All functions are tag so they can be called inside recover blocks.
Constructors¶
create¶
Returns¶
- DrawingPrimitives val^
Public Functions¶
draw_box¶
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¶
- 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
Returns¶
- None val
eq¶
Parameters¶
- that: DrawingPrimitives val
Returns¶
- Bool val
ne¶
Parameters¶
- that: DrawingPrimitives val
Returns¶
- Bool val