This library is implemented under the X11 windows system.
Programs that use the graphics library must be linked as follows:
ocamlc other options graphics.cma other files
For interactive use of the graphics library, do:
ocamlmktop -o mytop graphics.cma
./mytop
or (if dynamic linking of C libraries is supported on your platform),
start ocaml and type #load "graphics.cma";;.
Here are the graphics mode specifications supported by open_graph on
the X11 implementation of this library:
the argument to open_graph has the format
"display-name geometry",
where display-name is the name of the X-windows display to
connect to, and geometry is a standard X-windows geometry
specification. The two components are separated by a space. Either can
be omitted, or both. Examples:
-
open_graph "foo:0"
-
connects to the display foo:0 and creates a window with the default geometry
- open_graph "foo:0 300x100+50-0"
-
connects to the display foo:0 and creates a window 300 pixels wide
by 100 pixels tall, at location (50,0)
- open_graph " 300x100+50-0"
-
connects to the default display and creates a window 300 pixels wide
by 100 pixels tall, at location (50,0)
- open_graph ""
-
connects to the default display and creates a window with the default
geometry.