Notty.Render
Dump images to string buffers.
val to_buffer : Stdlib.Buffer.t -> Cap.t -> (int * int) -> (int * int) -> image -> unit
to_buffer buf cap (x, y) (w, h) i writes the string representation of i to buf, as interpreted by cap.
to_buffer buf cap (x, y) (w, h) i
i
buf
cap
It renders the w * h rectangle of i, offset by (x, y) from the top left.
w * h
(x, y)
val pp : Cap.t -> Stdlib.Format.formatter -> image -> unit
pp cap ppf i renders i to the pretty-printer ppf.
pp cap ppf i
ppf
Note pp is generally meant for development and debugging. It tries to be reasonable, but dedicated IO modules handle the actual output better.
pp