Introduction
Cairo
is a 2D graphics library with support for multiple output devices. cl-cairo2 package
provides Common Lisp bindings for the Cairo API, with the following principles in
mind:
-
CFFI bindings are generated by SWIG.
This ensures that API changes are caught easily and makes it easier to follow them.
The bindings to C functions are not exported directly.
-
It attempts to make the interface more Lisp-like.
The Cairo API is written in C, which has no garbage collection or condition handling,
and has little support for sophisticated dynamic data structures. However, the
Lisp user should not worry about reference counting and pointer arithmetic. Instead
of merely providing the C wrappers, cl-cairo2 aims to provide an interface conforming
to the style of Lisp better.
-
Condition handling.
In the Cairo API, an error is signaled by changing the state of the object, which
the user is supposed to query periodically. The functions in cl-cairo2 do this
automatically, and use Common Lisp's powerful condition facility to signal errors
(this feature is not fully developed yet: currently a warning is signalled for
all errors. The framework is in place, I just need to decide which errors require
user intervention, etc).
cl-cairo2 is licensed under the
GNU Public License
News
-
Aug 22, 2007
Yet another complete reworking of X11 support. I think I caught an elusive bug
which prevented refreshing of the window under some circumstances. Also put exported
symbols in
package.lisp
where they belong, and added sync locks (much faster when drawing a lot of small
objects.)
-
Aug 12, 2007
Complete reworking of X11 support. The current implementation doesn't use a custom
library, supports multiple displays and is much more bug-free (hopefully).
-
Jul 26, 2007
A very simple interface using
cl-colors
was added: now you an use code like
(set-source-color +darkolivegreen+).
-
Jul 21, 2007
Minor change: property names became longer, to avoid name clashes (eg
in
is now
operator-in).
- Jul 12, 2007 Added finalizers (please use latest CFFI).
- Jun 21, 2007 Added SVG and Xlib support.
Mailing Lists
Download
There are no releases, you can download the latest version
here. Using ASDF-Install is recommended.
Documentation
Start with the tutorial.
Project members
Tamas K Papp (tpapp)
SVN
You can
browse our SVN repository
or download the current development tree via anonymous access, as described
here.