#!/usr/bin/env lua5.1 local svg = require 'marigold' local img = svg.svg{ style = 'fill=#bbbbbbff', width = '100mm', height = '100mm', svg.rect{ x=0, y=0, width='100mm', height='100mm', style='fill: #ff0000ff' }, svg.text('hello c:', { x=10, y=10, style='font-family: Verdana' }), } local f = io.open('output.svg', 'w') f:write(svg.render(img)) f:close()