package hardcaml_waveterm

  1. Overview
  2. Docs

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

In memory based API with no external requirements

In memory based API with no external requirements

In memory based API with no external requirements

type point = Hardcaml_waveterm__.Import.Int.t * Hardcaml_waveterm.Draw.Style.t
include Hardcaml_waveterm.Draw.S with type ctx = point Hardcaml_waveterm__.Import.Array.t Hardcaml_waveterm__.Import.Array.t and type style = Hardcaml_waveterm.Draw.Style.t with type style = Hardcaml_waveterm.Draw.In_memory.style
type ctx = point Hardcaml_waveterm__.Import.Array.t Hardcaml_waveterm__.Import.Array.t

drawing context

underlying style type

val rows : ctx -> Hardcaml_waveterm__.Import.Int.t
val cols : ctx -> Hardcaml_waveterm__.Import.Int.t
val get_bounds : ctx -> Hardcaml_waveterm.Draw.rect

get context size

convert our style info to underlying style

val clear : ctx -> Hardcaml_waveterm__.Import.Unit.t

clear display

val fill : ctx:ctx -> style:style -> bounds:Hardcaml_waveterm.Draw.rect -> Hardcaml_waveterm__.Import.Char.t -> Hardcaml_waveterm__.Import.Unit.t

fill bounds with char given style

val draw_int : ctx:ctx -> style:style -> bounds:Hardcaml_waveterm.Draw.rect -> r:Hardcaml_waveterm__.Import.Int.t -> c:Hardcaml_waveterm__.Import.Int.t -> Hardcaml_waveterm__.Import.Int.t -> Hardcaml_waveterm__.Import.Unit.t

draw int (representing unicode value)

val draw_piece : ctx:ctx -> style:style -> bounds:Hardcaml_waveterm.Draw.rect -> r:Hardcaml_waveterm__.Import.Int.t -> c:Hardcaml_waveterm__.Import.Int.t -> Hardcaml_waveterm.Draw.piece -> Hardcaml_waveterm__.Import.Unit.t

draw piece

val draw_char : ctx:ctx -> style:style -> bounds:Hardcaml_waveterm.Draw.rect -> r:Hardcaml_waveterm__.Import.Int.t -> c:Hardcaml_waveterm__.Import.Int.t -> Hardcaml_waveterm__.Import.Char.t -> Hardcaml_waveterm__.Import.Unit.t

draw char

val draw_string : ctx:ctx -> style:style -> bounds:Hardcaml_waveterm.Draw.rect -> r:Hardcaml_waveterm__.Import.Int.t -> c:Hardcaml_waveterm__.Import.Int.t -> Hardcaml_waveterm__.Import.String.t -> Hardcaml_waveterm__.Import.Unit.t

draw string (nothing fancy - horizontal, no breaks)

val draw_box : ctx:ctx -> style:style -> bounds:Hardcaml_waveterm.Draw.rect -> Hardcaml_waveterm__.Import.String.t -> Hardcaml_waveterm__.Import.Unit.t

draw box outline with label

val get : ctx:ctx -> bounds:Hardcaml_waveterm.Draw.rect -> r:Hardcaml_waveterm__.Import.Int.t -> c:Hardcaml_waveterm__.Import.Int.t -> Hardcaml_waveterm__.Import.Int.t * Hardcaml_waveterm.Draw.Style.t

get value and style at point

val inv : ctx:ctx -> bounds:Hardcaml_waveterm.Draw.rect -> r:Hardcaml_waveterm__.Import.Int.t -> c:Hardcaml_waveterm__.Import.Int.t -> Hardcaml_waveterm__.Import.Unit.t

invert fg and bg at point

val bold : ctx:ctx -> bounds:Hardcaml_waveterm.Draw.rect -> r:Hardcaml_waveterm__.Import.Int.t -> c:Hardcaml_waveterm__.Import.Int.t -> Hardcaml_waveterm__.Import.Unit.t

set bold on point

val init : rows:Hardcaml_waveterm__.Import.Int.t -> cols:Hardcaml_waveterm__.Import.Int.t -> ctx
val to_image : ctx -> Notty.I.t
OCaml

Innovation. Community. Security.