Hardcaml_waveterm_interactive.Draw_notty
Notty based gfx API. We need to use an intermediate in memory representation for notty.
include module type of Hardcaml_waveterm.Expert.Draw.In_memory
with type style = Hardcaml_waveterm.Expert.Draw.In_memory.style
In memory based API with no external requirements
type point = Base.int * Hardcaml_waveterm.Expert.Draw.Style.t
include Hardcaml_waveterm.Expert.Draw.S
with type ctx = point Base.array Base.array
and type style = Hardcaml_waveterm.Expert.Draw.Style.t
with type style = Hardcaml_waveterm.Expert.Draw.In_memory.style
type ctx = point Base.array Base.array
drawing context
type style = Hardcaml_waveterm.Expert.Draw.In_memory.style
underlying style type
val rows : ctx -> Base.int
val cols : ctx -> Base.int
val get_bounds : ctx -> Hardcaml_waveterm.Expert.Draw.rect
get context size
val get_style : Hardcaml_waveterm.Expert.Draw.Style.t -> style
convert our style info to underlying style
val clear : ctx -> Base.unit
clear display
val fill :
ctx:ctx ->
style:style ->
bounds:Hardcaml_waveterm.Expert.Draw.rect ->
Base.char ->
Base.unit
fill bounds
with char
given style
val draw_int :
ctx:ctx ->
style:style ->
bounds:Hardcaml_waveterm.Expert.Draw.rect ->
r:Base.int ->
c:Base.int ->
Base.int ->
Base.unit
draw int (representing unicode value)
val draw_piece :
ctx:ctx ->
style:style ->
bounds:Hardcaml_waveterm.Expert.Draw.rect ->
r:Base.int ->
c:Base.int ->
Hardcaml_waveterm.Expert.Draw.piece ->
Base.unit
draw piece
val draw_char :
ctx:ctx ->
style:style ->
bounds:Hardcaml_waveterm.Expert.Draw.rect ->
r:Base.int ->
c:Base.int ->
Base.char ->
Base.unit
draw char
val draw_string :
ctx:ctx ->
style:style ->
bounds:Hardcaml_waveterm.Expert.Draw.rect ->
r:Base.int ->
c:Base.int ->
Base.string ->
Base.unit
draw string (nothing fancy - horizontal, no breaks)
val draw_box :
ctx:ctx ->
style:style ->
bounds:Hardcaml_waveterm.Expert.Draw.rect ->
Base.string ->
Base.unit
draw box outline with label
val get :
ctx:ctx ->
bounds:Hardcaml_waveterm.Expert.Draw.rect ->
r:Base.int ->
c:Base.int ->
Base.int * Hardcaml_waveterm.Expert.Draw.Style.t
get value and style at point
val inv :
ctx:ctx ->
bounds:Hardcaml_waveterm.Expert.Draw.rect ->
r:Base.int ->
c:Base.int ->
Base.unit
invert fg and bg at point
val bold :
ctx:ctx ->
bounds:Hardcaml_waveterm.Expert.Draw.rect ->
r:Base.int ->
c:Base.int ->
Base.unit
set bold on point
val init : rows:Base.int -> cols:Base.int -> ctx
val to_image : ctx -> Notty.I.t