Warning: Reason support is experimental. We are looking for beta-tester and contributors.

Module Lwt_term.Draw

module Draw : sig..end

Drawing helpers


Note: except for Lwt_term.Draw.get, all function ignore points that are outside the zone

val get : zone:Lwt_term.Zone.t -> x:int -> y:int -> Lwt_term.point

get ~zone ~x ~y returns the point at relative position x and y. Raises Invalid_argument if the coordinates are outside the zone

val set : 
  zone:Lwt_term.Zone.t -> x:int -> y:int -> point:Lwt_term.point -> unit

set ~zone ~x ~y ~popint sets point at relative position x and y.

val map : 
  zone:Lwt_term.Zone.t ->
  x:int -> y:int -> (Lwt_term.point -> Lwt_term.point) -> unit

map ~zone ~x ~y f replace the point at coordinates (x, y) by the result of f applied on it.

val text : zone:Lwt_term.Zone.t -> x:int -> y:int -> text:Text.t -> unit

Draw the given text at the given positon

val textf : 
  Lwt_term.Zone.t ->
  int -> int -> ('a, unit, string, unit) Pervasives.format4 -> 'a

Same as Lwt_term.Draw.text but uses a format string

val textc : 
  zone:Lwt_term.Zone.t ->
  x:int -> y:int -> text:Lwt_term.styled_text -> unit

Same as Lwt_term.Draw.text but takes a text with styles