diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2011-02-15 18:04:31 +0100 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2011-02-19 22:49:20 +0100 |
commit | 6a8238846c53440dad44f2f3678ff45360b29927 (patch) | |
tree | 58b8a4881b02df2e752166892740a38ac3d6586b /share/library | |
parent | 412a01690b392add29d0c1d7d0fa3621a3694e47 (diff) | |
download | logdiag-6a8238846c53440dad44f2f3678ff45360b29927.tar.gz logdiag-6a8238846c53440dad44f2f3678ff45360b29927.tar.xz logdiag-6a8238846c53440dad44f2f3678ff45360b29927.zip |
Add a symbol for junctions.
Diffstat (limited to 'share/library')
-rw-r--r-- | share/library/Misc/junction.lua | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/share/library/Misc/junction.lua b/share/library/Misc/junction.lua new file mode 100644 index 0000000..d50137b --- /dev/null +++ b/share/library/Misc/junction.lua @@ -0,0 +1,24 @@ +-- Symbol name +local names = +{ + en = "Junction", + cs = "Spoj" +} + +-- Render area in base units (X1, Y1, X2, Y2) +local area = {-0.5, -0.5, 0.5, 0.5} + +-- Terminal points +local terminals = {} + +-- Rendering +local render = function (cr) + -- The disk + cr.arc (0, 0, 0.3, 0, math.pi * 2) + cr.fill () +end + +-- Register the symbol +logdiag.register ("Junction", names, area, terminals, render) + + |