caml-list - the Caml user's mailing list
 help / Atom feed
From: "Nicolas Janin" <>
To: "SooHyoung Oh" <>, <>
Subject: [Caml-list] Re: Graphic frustration
Date: Sat, 26 Jul 2003 10:46:12 +0200
Message-ID: <000b01c35352$5e337480$9a823951@Pif> (raw)
In-Reply-To: <003001c35316$75f8a040$fe00a8c0@hama>

I think what  Matt Gushee's concern is, and  it is clear he isn't alone in
this case (see for example the thread "Roadplan for world domination"
07/25/2003), that now that Ocaml is a mature language, its major drawback
lies in the display and drawing area. There exists several bindings for
different usages in the graphical area but they are all developed in a
different manner, without any integration with existing components. Using
the libraries that exist currently here and there can only be short term
solutions for the serious user.
My feeling is that they are inadequate for corporate users and most
individuals, who don't want to spend twice as much time reading the
documentation (or the code itself !) of each and every library they need for
their projects. Also, since these are small projects by single individuals,
one doesn't know whether they are still maintained or not, so one may have
concerns using them.

Since Ocaml is a powerful language, it needs to show it can handle an
ambitious project :

1. Ocaml needs a comprehensive graphic library that encompasses all the
users needs, so that they won't have to reinvent the wheel each time they
need to do graphics : there exists bindings for SDL and Open GL, but it's a
pain to have to learn each and every library, and have to write again and
again all the code that lacks between the two. This is not practical at all.

What the serious user really wants is a SINGLE large, modular, fast &
extensible library that allows in a consistent manner  to do just about
everything graphical :

 - real time vizualisation for 3D games and 3D softwares with accelerated
Open GL,

 - raster image display (JPEG, PNG formats) in bitmap, B&W and true color,
and some basic image treatments algorithms,

 - 2D vectorized drawing primitives and vectorized text (Display Postscript
or Scalable Vector Graphics support, whichever),

 - a system for displaying and manipulating objects of all the predefined
graphical types on screen (a system of layers, for example),

 - output to the screen (anti-aliasing), Postscript and PDF formats for
printing (and optionnally XML for portable description).

 - an architecture that allows to extend the library fairly easily (with,
optionnally, an embedded interpreted language like Lua or Guile that would
allow applications written with the library, to add some graphical
fuctionalities for their specific uses),

 - a complete ocamldoc documentation.

2. Ocaml lacks a multiplatform native code GUI system, GTK is ok and a
wxwindows should help making GUIs multiplatform, but ideally, a modern
native Ocaml GUI based on the above library would be much better.
Of course, the better and more comprehensive the graphic library is, the
easier to develop and more powerful the GUI. The GUI could also be piloted
or extended in some ways by the scripting language of the graphic library.

Hopefully, by its sheer size and ambitious, provided that it eventually
exists, such a project would attract many volunteers, and a consistent
support throughout the years. Eventually, it could become the centerpiece of
a whole lot of software libraries.


----- Original Message -----
From: "SooHyoung Oh" <>
To: "Matt Gushee" <>; <>
Sent: Saturday, July 26, 2003 3:41 AM

> Subject: Re: [Caml-list] Graphics frustration
> Date: Sat, 26 Jul 2003 10:37:20 +0900
> MIME-Version: 1.0
> Content-Type: text/plain;
> charset="iso-8859-1"
> Content-Transfer-Encoding: 7bit
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-Mailer: Microsoft Outlook Express 6.00.2600.0000
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
> X-Loop:
> X-Spam: no; 0.00; caml-list:01 gushee:01 mgushee:01 havenrock:01 all--:01
arc:99 ocamlplot:01 api:01 camlimages:01 englewood:01 manure:01
ignores:01 --lao:01 merel:01 bug:01
> Sender:
> Precedence: bulk
> What do you think about SVG (Selective Vector Graphics)?
> It uses only text for graphics as postscript so it's not difficult to use
> OCaml for SVG.
> If you interested about that, I'll send you a few examples.
> ---
> SooHyoung Oh
> ----- Original Message -----
> From: "Matt Gushee" <>
> To: <>
> Sent: Thursday, July 24, 2003 1:20 PM
> Subject: [Caml-list] Graphics frustration
> > Hello, all--
> >
> > I have been working on an application which will generate on-the-fly
> > graphics for the Web, but I have become very frustrated by the
> > limitations of the available graphics libraries for OCaml. If anyone
> > reading this thinks there are solutions I have overlooked, I would be
> > happy to discuss details. Right now, though, my purpose is to find out
> > whether others share my concerns, and how much interest there is in
> > developing better graphics libraries.
> >
> > What I would like to see is a single library with at least the
> > following capabilities:
> >
> >   * drawing primitives: line, rectangle, ellipse and/or arc, perhaps
> >     bezier curves
> >
> >   * rendering text with arbitrary Type 1 and/or TrueType fonts
> >
> >   * antialiasing
> >
> >   * basic image manipulation functions such as transformations,
> >     contrast adjustment, cropping, etc.
> >
> >   * saving to common bitmap formats such as JPEG and PNG
> >
> >   * cross-platform
> >
> > taking the various graphics packages together, all these capabilities
> > exist, but as far as I can tell there is no single package that combines
> > them all. So, in developing my application, I started out with
> > OCamlPlot, but discovered that it
> >
> >   - doesn't do antialiasing
> >
> >   - uses only 2 or 3 built-in fonts for PNG output
> >
> >   - has a rather rigid and idiosyncratic API
> >
> >   - doesn't run on Windows
> >
> > Then I decided to try MLgraph + Camlimages, which is an improvement, but
> > still falls short: MLgraph is excellent for drawing, but saves only to
> > PostScript--and I find the final result, converted to PNG with
> > CamlImages, rather unsatisfactory (the main problem is that antialiasing
> > doesn't work very well, which may actually be a Ghostscript issue).
> > Performance with this combination is also markedly poorer than with
> > OCamlPlot.
> >
> > Then there's OCamlGD, which seems quite promising. When complete, it
> > will probably satisfy all my requirements; but there hasn't been a
> > relesase in quite a while.
> >
> > So that's a quick summary of my situation. Do others agree with me that
> > this is a significant problem? Are there any good solutions in the
> > works?
> >
> > I am happy, by the way, to put some effort into developing something
> > better. My contribution would be limited, though (I'm not a C
> > programmer, for example, so I wouldn't be able to create a wrapper for
> > an existing C library.).
> >
> > Comments?
> >
> > --
> > Matt Gushee                 When a nation follows the Way,
> > Englewood, Colorado, USA    Horses bear manure through
> >           its fields;
> >   When a nation ignores the Way,
> >                             Horses bear soldiers through
> >                                 its streets.
> >
> >                             --Lao Tzu (Peter Merel, trans.)
> >
> > -------------------
> > To unsubscribe, mail Archives:
> > Bug reports: FAQ:
> > Beginner's list:
> >
> -------------------
> To unsubscribe, mail Archives:
> Bug reports: FAQ:
> Beginner's list:
> _____________________________________________________________________
> Envie de discuter en "live" avec vos amis ? Télécharger MSN Messenger
> la 1ère messagerie instantanée de France

Envie de discuter en "live" avec vos amis ? Télécharger MSN Messenger la 1ère messagerie instantanée de France

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list:

  parent reply index

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-24  4:20 [Caml-list] Graphics frustration Matt Gushee
2003-07-24 12:03 ` Richard Jones
2003-07-26  1:37 ` SooHyoung Oh
2003-07-26  1:55   ` SooHyoung Oh
2003-07-26  4:21     ` Matt Gushee
2003-07-26  4:34       ` Alexander V. Voinov
2003-07-26  8:45   ` Nicolas Janin [this message]
2003-07-26  8:58   ` [Caml-list] Nicolas Janin

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000b01c35352$5e337480$9a823951@Pif' \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

caml-list - the Caml user's mailing list

Archives are clonable: git clone --mirror

AGPL code for this site: git clone public-inbox