package graphics
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=2dcf60d552aeb2b8bf6c1fe1964c5affe8bfe38bc4b86259ee4dcbeba230155d
sha512=7714e4f8cd8757d1ed3e919d00da0e1365b0e24b74560c620c4d4a12f85a62a6bbbb76ce436bed6237876669e4fef883d390ab1faf2b7ef2e07cd6ce838ed222
Description
The graphics library provides a set of portable drawing primitives. Drawing takes place in a separate window that is created when Graphics.open_graph is called.
This library used to be distributed with OCaml up to OCaml 4.08.
Published: 17 Sep 2019
README
Graphics
The graphics library provides a set of portable drawing primitives. Drawing takes place in a separate window that is created when Graphics.open_graph is called. It used to be distributed with OCaml up to OCaml 4.08.
On Unix
On Unix graphics uses the X11 windows system.
Here are the graphics mode specifications supported by Graphics.open_graph
on the X11 implementation of this library: the argument to Graphics.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:
Graphics.open_graph "foo:0"
: connects to the display foo:0 and creates a window with the default geometryGraphics.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)Graphics.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)Graphics.open_graph ""
connects to the default display and creates a window with the default geometry.
On Windows
On Windows graphics uses the native Win32 API.
Examples
The examples/
directory contains a few examples. You can run them with:
dune exec examples/graph_example.exe
dune exec examples/graph_test.exe
dune exec examples/sorts.exe
Dependencies (3)
-
ocaml
>= "4.09.0~~" & < "4.10"
- conf-libX11
-
dune
>= "1.11"
Dev Dependencies
None
Used by (14)
-
archimedes
< "0.4.17"
- async_graphics
-
cairo2
< "0.5"
-
js_of_ocaml-toplevel
>= "3.10.0"
- knights_tour
-
lutin
>= "2.71.10"
-
mesh
>= "0.8.7" & < "0.8.9"
- mesh-display
- mesh-graphics
-
ocamlgraph
>= "2.0.0"
- ocamlgraph_gtk
-
ocapic
>= "3.3"
-
oplot
= "0.50"
-
owi
>= "0.2"
Conflicts
None