package notty

  1. Overview
  2. Docs

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.

It renders the w * h rectangle of i, offset by (x, y) from the top left.

val pp : Cap.t -> Stdlib.Format.formatter -> image -> unit

pp cap ppf i renders i to the pretty-printer ppf.

Note pp is generally meant for development and debugging. It tries to be reasonable, but dedicated IO modules handle the actual output better.

OCaml

Innovation. Community. Security.