Hardcaml_waveterm_kernel.DrawGraphics drawing api to a 2d array of integers.
Most functions take a bounds parameter which is a Rect.t to which drawing is clipped and also serves as an origin for any coordinates.
val sexp_of_piece : piece -> Sexplib0.Sexp.ttype ctx = (Base.int * Style.t) Base.array Base.arraydrawing context
fill bounds with char given style
val draw_int :
ctx:ctx ->
style:Style.t ->
bounds:Rect.t ->
r:Base.int ->
c:Base.int ->
Base.int ->
Base.unitdraw int (representing unicode value)
val draw_piece :
ctx:ctx ->
style:Style.t ->
bounds:Rect.t ->
r:Base.int ->
c:Base.int ->
piece ->
Base.unitdraw piece
val draw_char :
ctx:ctx ->
style:Style.t ->
bounds:Rect.t ->
r:Base.int ->
c:Base.int ->
Base.char ->
Base.unitdraw char
val draw_string :
ctx:ctx ->
style:Style.t ->
bounds:Rect.t ->
r:Base.int ->
c:Base.int ->
Base.string ->
Base.unitdraw string (nothing fancy - horizontal, no breaks)
val draw_box :
ctx:ctx ->
style:Style.t ->
bounds:Rect.t ->
Base.string ->
Base.unitdraw box outline with label
get value and style at point