Module Draw.Make
Construct the API from a Primitives implementation
Parameters
B : Primitives
Signature
type ctx= B.ctxdrawing context
val rows : ctx -> Import.intval cols : ctx -> Import.intval get_bounds : ctx -> rectget context size
val clear : ctx -> Import.unitclear display
val fill : ctx:ctx -> style:style -> bounds:rect -> Import.char -> Import.unitfill
boundswithchargivenstyle
val draw_int : ctx:ctx -> style:style -> bounds:rect -> r:Import.int -> c:Import.int -> Import.int -> Import.unitdraw int (representing unicode value)
val draw_piece : ctx:ctx -> style:style -> bounds:rect -> r:Import.int -> c:Import.int -> piece -> Import.unitdraw piece
val draw_char : ctx:ctx -> style:style -> bounds:rect -> r:Import.int -> c:Import.int -> Import.char -> Import.unitdraw char
val draw_string : ctx:ctx -> style:style -> bounds:rect -> r:Import.int -> c:Import.int -> Import.string -> Import.unitdraw string (nothing fancy - horizontal, no breaks)
val draw_box : ctx:ctx -> style:style -> bounds:rect -> Import.string -> Import.unitdraw box outline with label
val get : ctx:ctx -> bounds:rect -> r:Import.int -> c:Import.int -> Import.int * Style.tget value and style at point
val inv : ctx:ctx -> bounds:rect -> r:Import.int -> c:Import.int -> Import.unitinvert fg and bg at point
val bold : ctx:ctx -> bounds:rect -> r:Import.int -> c:Import.int -> Import.unitset bold on point