diff options
author | sanine <sanine.not@pm.me> | 2023-08-18 15:48:54 -0500 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2023-08-18 15:48:54 -0500 |
commit | c8f36f3df88c1a4064a9c73c95a165eb13beeb20 (patch) | |
tree | e18d7cfd9cac65f2f5b34fb710f8532a4c441805 /demo.lua | |
parent | 83448304527d8a1dde233f2f33b98124bced5f88 (diff) |
add demomain
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() |