Debian Codegraph @

README.ocamlgd

raw
1 Ocaml-GD 0.5
2
3 This is an interface to the GD graphics library for Ocaml.
4 It's used to make simple graphic images, usually in the png format.
5
6 The interface tends to follow the GD functions.
7
8 And unlike a lot of ocaml libraries, this uses it's OO features. It
9 also uses labels, though it should be possible to use it in code that
10 doesn't. It uses labels because many of the functions take many int
11 arguments, and the labels helps (Me, at least) to keep everything
12 straight. And if you forget the order, it's no big deal.
13
14 There's an image class, and color and font allocation classes, and a
15 color class. Thus, drawing a red line might look like:
16
17 myimage#line ~x1:0 ~y1:0 ~x2:60 ~y2:30 myimage#colors#red
18
19 intead of
20
21 Gd.line myimage ~x1:0 ~y1:0 ~x2:60 ~y2:30 (Gd.red myimage)
22
23 See manual.txt and gd.mli for documentation.
24
25 TODO:
26 Interlaced images
27 Serialization?
28 Reading and writing more image formats.
29 Brushes
30 Polygons