lua-users home
lua-l archive

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


Just a though cairo is wrapped for Lua and can render to svg

Its a clean easy to use C api with the graphics functions working
a bit like a logo turtle

Could make of an easy to implement low level part of what you
are trying for...

Best
C

David Manura wrote:
On Wed, Aug 12, 2009 at 2:13 AM, Asko Kauppi wrote:
The idea is that Lua syntax is a bit nicer to craft than XML, but this also
allows programmatic creation of macro-like objects (functions that create
graphical objects) that can be turned around, copied etc.. SVG has a "uses"
element for that, but this is more easy on the eyes (clearer code).

On Sun, Aug 16, 2009 at 4:45 AM, Stuart P. Bentley wrote:
I've also written a modeling framework that works almost exactly like this! ....
(This gets passed to a function "model", which uses as an environment a
table of primitive-generating functions.

There's a number of ways to design this [1,2], and some ways can be
expressed in terms of wrappers around other ways.  I've been tending
to settle on Asko's style, which avoids the function and environment
(which has undesirable qualities like locals outside the function
overriding environment variables and environments complicating static
methods of detecting undefined variables [3]).  As Asko mentioned, the
Lua structure is somewhat like XML, and in that way it can be made to
work like pure data provided you don't intersperse other Lua
constructs into it (which unfortunately complicates clean round-trip
serialization).

[1] http://lua-users.org/wiki/LuaDataFormats
[2] http://lua-users.org/wiki/TableScope
[3] http://lua-users.org/wiki/DetectingUndefinedVariables


--
Disclaimer:
By sending an email to ANY of my addresses you are agreeing that:

  1. I am by definition, "the intended recipient"

  2. All information in the email is mine to do with as I see fit and
make such financial profit, political mileage, or good joke as it lends
itself to. In particular, I may quote it where I please.

  3. I may take the contents as representing the views of your company.

  4. This overrides any disclaimer or statement of confidentiality that
may be included on your message.