lua-users home
lua-l archive

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


Hi,

(Warning! This is a test release. There are too many "not implemented" messages and TODO's.)

- Binding for Cairo-1.4.6
- Uses Luna(r)
- Source included
- Win32 binary included, compiled with Mingw
- There is a snippet runner app, written with wxLua
- Unzip somewhere, run run.bat :)

You can get it here:
www.dogusan.net/dogusanh/download/luacairo.zip (3218Kb)


I need your advice for cairo_matrix_t; It is declared as:

typedef struct _cairo_matrix {
    double xx; double yx;
    double xy; double yy;
    double x0; double y0;
} cairo_matrix_t;

And usage is like:

cairo_matrix_t   matrix;
cairo_matrix_init_scale (&matrix, w * 5., h * 5.);
cairo_pattern_set_matrix (pattern, &matrix);

Which one of the following is "Lua way"/practical?

- named fields,ie:
  matrix = {xx=.5, yx=1.0, xy=.9, yy=.3, x0=.3, y0=.2}

- or, array, ie:
  matrix = {.5, 1.0, .9, .3, .3, .2}

- or, something else

TIA.


--
Regards,
Hakki Dogusan