Draw.Make
Construct the API from a Primitives implementation
module B : Primitives
type ctx = B.ctx
drawing context
val rows : ctx -> Base.int
val cols : ctx -> Base.int
val clear : ctx -> Base.unit
clear display
fill bounds
with char
given style
val draw_int :
ctx:ctx ->
style:style ->
bounds:rect ->
r:Base.int ->
c:Base.int ->
Base.int ->
Base.unit
draw int (representing unicode value)
val draw_piece :
ctx:ctx ->
style:style ->
bounds:rect ->
r:Base.int ->
c:Base.int ->
piece ->
Base.unit
draw piece
val draw_char :
ctx:ctx ->
style:style ->
bounds:rect ->
r:Base.int ->
c:Base.int ->
Base.char ->
Base.unit
draw char
val draw_string :
ctx:ctx ->
style:style ->
bounds:rect ->
r:Base.int ->
c:Base.int ->
Base.string ->
Base.unit
draw string (nothing fancy - horizontal, no breaks)
draw box outline with label
get value and style at point