diff options
Diffstat (limited to 'demo.lua')
-rwxr-xr-x | demo.lua | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/demo.lua b/demo.lua new file mode 100755 index 0000000..9c8dd34 --- /dev/null +++ b/demo.lua @@ -0,0 +1,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() |