package notty

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Convert images to string.

For use when you conclude that the output facilities are inadequate and that you want to take your business elsewhere.

val to_buffer : 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, as interpreted by cap, to buf. Only the w * h rectangle of i offset by (x, y) from top left is rendered.

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

pp cap ppf i pretty-prints i to ppf, as interpreted by cap.

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

OCaml

Innovation. Community. Security.