Coder Social home page Coder Social logo

graphics-1's Introduction

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.

Screenshot

Documentation

The API is documented here and as comments in the source file src/graphics.mli.

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 geometry
  • Graphics.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

graphics-1's People

Contributors

alainfrisch avatar bobot avatar camlspotter avatar damiendoligez avatar danmey avatar diremy avatar dra27 avatar fdopen avatar fourchaux avatar gasche avatar jeremiedimino avatar lefessan avatar maranget avatar mshinwell avatar murmour avatar nojb avatar np avatar octachron avatar pierreweis avatar roglo avatar shindere avatar stedolan avatar whitequark avatar xavierleroy avatar yallop avatar zoggy avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.