Vg is a declarative 2D vector graphics library for OCaml. Images are values that denote functions mapping points of the cartesian plane to colors and combinators are provided to define and compose these values.

Renderers for PDF, SVG, the HTML canvas and Cairo are distributed with the library. An API allows to implement new renderers.

Vg is distributed under the ISC license. Vg and the SVG renderer depend on Gg. The PDF renderer depends on Otfm, the HTML canvas renderer depends on Brr, the Cairo renderer depends on cairo2.

Sample images from Vg's image test database.

Talk about Vg.