summaryrefslogtreecommitdiff
path: root/html/examples/cdpdf.lua
diff options
context:
space:
mode:
Diffstat (limited to 'html/examples/cdpdf.lua')
-rw-r--r--html/examples/cdpdf.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/html/examples/cdpdf.lua b/html/examples/cdpdf.lua
new file mode 100644
index 0000000..4f62977
--- /dev/null
+++ b/html/examples/cdpdf.lua
@@ -0,0 +1,9 @@
+require"cdlua"
+require"cdluapdf"
+
+canvas = cd.CreateCanvas(cd.PDF, "test.pdf")
+canvas:Foreground (cd.RED)
+canvas:Box (10, 55, 10, 55)
+canvas:Foreground(cd.EncodeColor(255, 32, 140))
+canvas:Line(0, 0, 300, 100)
+canvas:Kill()