caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Graphics library
@ 1999-04-23  1:03 Marc Tajchman
  1999-04-23  9:22 ` Sven LUTHER
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Marc Tajchman @ 1999-04-23  1:03 UTC (permalink / raw)
  To: caml-list

Hi,

I have two suggestions concerning the graphics library in
ocaml-2.0.2.

It's simple and works well but it seems not possible to
use this package to

 1. open several X11 windows
 2. draw "off-line" (double buffering)

I need the second point to eliminate "flickering" (smooth 
re-drawing of successive intermediate results in a fluid
simulation).

Hope I didn't miss something in the docs.

Thanks in advance for comments.
 
_______________________________________________________________________
Marc Tajchman,           tel.   : (0 / 33) 1 47 40 59 45
                         e-mail : Marc.Tajchman@cmla.ens-cachan.fr
                         fax    : (0 / 33) 1 47 40 59 01

Centre de Mathématiques et de Leurs Applications, 
École Normale Supérieure de Cachan,
61, avenue du Président Wilson,
94235 Cachan Cedex - France.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Graphics library
  1999-04-23  1:03 Graphics library Marc Tajchman
@ 1999-04-23  9:22 ` Sven LUTHER
  1999-04-26  8:01 ` Fabrice Le Fessant
  1999-06-14 10:59 ` Sven LUTHER
  2 siblings, 0 replies; 4+ messages in thread
From: Sven LUTHER @ 1999-04-23  9:22 UTC (permalink / raw)
  To: Marc.Tajchman, caml-list

On Fri, Apr 23, 1999 at 03:03:09AM +0200, Marc Tajchman wrote:
> Hi,
> 
> I have two suggestions concerning the graphics library in
> ocaml-2.0.2.
> 
> It's simple and works well but it seems not possible to
> use this package to
> 
>  1. open several X11 windows
>  2. draw "off-line" (double buffering)
> 
> I need the second point to eliminate "flickering" (smooth 
> re-drawing of successive intermediate results in a fluid
> simulation).
> 
> Hope I didn't miss something in the docs.
> 
> Thanks in advance for comments.

Ihave been working on mlgtk, the gtk bindings to ocaml, and have been using it
for my own graphical user interface.

I was working on a project to provide a Graphics compatible module for mlgtk,
but laked the time to continue working on it.

If you like, you could look at the third tutorial of the mlgtk package
(examples/tut_3.ml or something like that) which basically opens a window
where you can click to draw small rectangles (it basically is the same as the
gtk example doing the same stuff.).

Hope this help, and if you have any further questions i would be glade to
respond on it.

(there is also a mlgtk mailing list at to subscribe send SUB <first name> <last
 name> to mlgtk@u-strasbg.fr)

mlgtk can be obtained from :

http://pauillac.inria.fr/~cuoq


Friendly,

Sven LUTHER




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Graphics library
  1999-04-23  1:03 Graphics library Marc Tajchman
  1999-04-23  9:22 ` Sven LUTHER
@ 1999-04-26  8:01 ` Fabrice Le Fessant
  1999-06-14 10:59 ` Sven LUTHER
  2 siblings, 0 replies; 4+ messages in thread
From: Fabrice Le Fessant @ 1999-04-26  8:01 UTC (permalink / raw)
  To: Marc.Tajchman; +Cc: caml-list


There is an implementation of the Graphics library of Ocaml in the
Efuns package (http://pauillac.inria.fr/efuns) which provides almost 
the same interface, with some more functions, such as double
buffering:

open XGraphics;;                                 (* instead of Graphics *)
open_graph "" 600 400;;             (* instead of open_graph " 600x400" *)
set_update_stype FlushAll;; 
                    (* for double-buffering, or FlushClipped for
                                           faster but not total refresh *)
.........
.........
.........                                        (* Idem as in Graphics *)
.........

update ();; 
           (* when you want to update the screen from the hidden buffer *)


Regards,

- Fabrice




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Graphics library
  1999-04-23  1:03 Graphics library Marc Tajchman
  1999-04-23  9:22 ` Sven LUTHER
  1999-04-26  8:01 ` Fabrice Le Fessant
@ 1999-06-14 10:59 ` Sven LUTHER
  2 siblings, 0 replies; 4+ messages in thread
From: Sven LUTHER @ 1999-06-14 10:59 UTC (permalink / raw)
  To: Marc.Tajchman, caml-list

On Fri, Apr 23, 1999 at 03:03:09AM +0200, Marc Tajchman wrote:
> Hi,
> 
> I have two suggestions concerning the graphics library in
> ocaml-2.0.2.
> 
> It's simple and works well but it seems not possible to
> use this package to
> 
>  1. open several X11 windows
>  2. draw "off-line" (double buffering)
> 
> I need the second point to eliminate "flickering" (smooth 
> re-drawing of successive intermediate results in a fluid
> simulation).
> 

The next version of the mlgtk library (gtk+ bindings for ocaml) will contain a
gtkDrawing module, that beside providing a Graphics compatibility module,
provides a way of defining GtkDrawingarea widgets with backing pixmap, that you
can act upon in a Graphics like manner (but providing the gtkdrawingarea widget
as parameter.)

It is not yet complete, but already functional for drawing stuff. Mlgtk is
found at :

http://cristal.inria.fr/~cuoq/mlgtk.html

but it don't yet contain this, write to me and i can get you a current snapshot
of it.

Friendly,

Sven LUTHER




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1999-06-14 15:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-04-23  1:03 Graphics library Marc Tajchman
1999-04-23  9:22 ` Sven LUTHER
1999-04-26  8:01 ` Fabrice Le Fessant
1999-06-14 10:59 ` Sven LUTHER

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).