From c8f36f3df88c1a4064a9c73c95a165eb13beeb20 Mon Sep 17 00:00:00 2001 From: sanine Date: Fri, 18 Aug 2023 15:48:54 -0500 Subject: add demo --- demo.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 demo.lua (limited to 'demo.lua') 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() -- cgit v1.2.1