package gd

  1. Overview
  2. Docs
OCaml interface to the GD graphics library.

Install

Dune Dependency

Authors

Maintainers

Sources

v1.1.tar.gz
md5=44a85ad07dce82f2ae17804a780b3b53
sha512=b1afa86174812f7ef0b3139fbb893ce4f328556f44293582ad83c10df8774c954801ba1f50f8d6526bc137f7fc13b97dd021174cb1c8f3ae645a93e050fe5c17

Description

Published: 27 Feb 2024

README

README.ocamlgd

Ocaml-GD 0.5

This is an interface to the GD graphics library for Ocaml.
It's used to make simple graphic images, usually in the png format.

The interface tends to follow the GD functions.

And unlike a lot of ocaml libraries, this uses it's OO features. It
also uses labels, though it should be possible to use it in code that
doesn't. It uses labels because many of the functions take many int
arguments, and the labels helps (Me, at least) to keep everything
straight. And if you forget the order, it's no big deal.

There's an image class, and color and font allocation classes, and a
color class.  Thus, drawing a red line might look like:

myimage#line ~x1:0 ~y1:0 ~x2:60 ~y2:30 myimage#colors#red

intead of

Gd.line myimage ~x1:0 ~y1:0 ~x2:60 ~y2:30 (Gd.red myimage)

See manual.txt and gd.mli for documentation.

TODO:
Interlaced images
Serialization?
Reading and writing more image formats.
Brushes
Polygons

Dev Dependencies (1)

  1. odoc with-doc

Used by

None

Conflicts

None