summaryrefslogtreecommitdiff
path: root/demo.lua
blob: 9c8dd34dd0b048903606ebdf9d01a2a0dc502434 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/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()