package hardcaml_waveterm

  1. Overview
  2. Docs

Module Hardcaml_waveterm_interactive.Draw_nottySource

Notty based gfx API. We need to use an intermediate in memory representation for notty.

include module type of Hardcaml_waveterm.Draw.In_memory with type style = Hardcaml_waveterm.Draw.In_memory.style
include Hardcaml_waveterm.Draw.S with type ctx = point Base.Array.t Base.Array.t and type style = Hardcaml_waveterm.Draw.Style.t with type style = Hardcaml_waveterm.Draw.In_memory.style

drawing context

underlying style type

Sourceval rows : ctx -> Base.Int.t
Sourceval cols : ctx -> Base.Int.t

get context size

convert our style info to underlying style

Sourceval clear : ctx -> Base.Unit.t

clear display

Sourceval fill : ctx:ctx -> style:style -> bounds:Hardcaml_waveterm.Draw.rect -> Base.Char.t -> Base.Unit.t

fill bounds with char given style

Sourceval draw_int : ctx:ctx -> style:style -> bounds:Hardcaml_waveterm.Draw.rect -> r:Base.Int.t -> c:Base.Int.t -> Base.Int.t -> Base.Unit.t

draw int (representing unicode value)

draw piece

Sourceval draw_char : ctx:ctx -> style:style -> bounds:Hardcaml_waveterm.Draw.rect -> r:Base.Int.t -> c:Base.Int.t -> Base.Char.t -> Base.Unit.t

draw char

Sourceval draw_string : ctx:ctx -> style:style -> bounds:Hardcaml_waveterm.Draw.rect -> r:Base.Int.t -> c:Base.Int.t -> Base.String.t -> Base.Unit.t

draw string (nothing fancy - horizontal, no breaks)

Sourceval draw_box : ctx:ctx -> style:style -> bounds:Hardcaml_waveterm.Draw.rect -> Base.String.t -> Base.Unit.t

draw box outline with label

get value and style at point

invert fg and bg at point

set bold on point

Sourceval init : rows:Base.Int.t -> cols:Base.Int.t -> ctx
Sourceval to_image : ctx -> Notty.I.t
OCaml

Innovation. Community. Security.