package vg

  1. Overview
  2. Docs
Declarative 2D vector graphics for OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

vg-0.9.5.tbz
sha512=ccd0d0f61cdbdb3420b5f4d747fe6e6b95e487738f70163a6e26396b1eeb9a42118306bc9c2c9afc9256171d57f81fbdf08ec558625eb5d723230aa0e9564fb6

Description

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

Renderers for PDF, SVG, Cairo and the HTML canvas are distributed with the module. 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.

Home page: http://erratique.ch/software/vg

README

Vg — Declarative 2D vector graphics for OCaml

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

Renderers for PDF, SVG, Cairo and the HTML canvas are distributed with the module. 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.

Home page: http://erratique.ch/software/vg

Installation

Vg can be installed with opam:

opam install vg                   # SVG renderer only
opam install brr cairo2 otfm vg   # All renderers

If you don't use opam consult the opam file for build instructions and a complete specification of the dependencies.

Documentation

The documentation can be consulted online or via odig doc vg.

Questions are welcome but better asked on the OCaml forum than on the issue tracker.

Sample programs

A database of test images can be found in the test/db directory. An online rendering of the database with the different backends and links to the source of images is available here

A few test programs and minimal rendering examples can be found in the test directory, see b0 list.

Dependencies (5)

  1. gg >= "1.0.0"
  2. topkg build & >= "1.0.3"
  3. ocamlbuild build
  4. ocamlfind build
  5. ocaml >= "4.14.0"

Dev Dependencies

None

Conflicts (3)

  1. otfm < "0.3.0"
  2. cairo2 < "0.6"
  3. brr < "0.0.6"
OCaml

Innovation. Community. Security.