lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

A while ago I started a project like this.  The goal was a highly
efficient hand generated full Cairo binding for Lua that was portable
between Linux, OS X, and Windows.  Since Cairo is such a low-level API
I wanted something with maximum performance.

I got too busy to finish it but I got pretty far and you may find the
source helpful.  I just put it up here (at the top of the page):

Eventually I wanted to write a SVG API entirely in Lua.  I know Cairo
has a SVG library but I wanted something with more power and where it
was easier to access the internals of the SVG structure.  For example,
it would be nice to be able to create a SVG that used Lua as the
scripting language rather than Javascript.


On 5/25/07, Hakki Dogusan <> wrote:

(Sorry, new topic to fix subject)

- Lua dependency removed
- Code changed to C
- Module renamed to lcairo.c as tradition
- Code::Blocks project file for cairo included
   (It's a XML file, you may edit before usage)
- lcario creates two -namespace- tables:
       cairo - for functions
       CAIRO - for constants, enums

    this simplifies translating C code to Lua, ie:
       cairo_set_operator (cr, CAIRO_OPERATOR_ADD);
       cairo.set_operator (cr, CAIRO.OPERATOR_ADD)

You can get it here: (3206Kb)

If you previously downloaded above file, you can get updates here: (290Kb)

Hakki Dogusan