aboutsummaryrefslogtreecommitdiff
path: root/share/library/Misc/voltage-source.lua
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2011-02-24 08:14:48 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2011-02-24 08:14:48 +0100
commitbd1b3adf56504f1d0f00c4502e8c241cf3b4a7e9 (patch)
tree47a40f0fc9df16948167cf5477cc417f8011f3ba /share/library/Misc/voltage-source.lua
parent8cdefbca29097992a81bd13bb26c1de457719d38 (diff)
downloadlogdiag-bd1b3adf56504f1d0f00c4502e8c241cf3b4a7e9.tar.gz
logdiag-bd1b3adf56504f1d0f00c4502e8c241cf3b4a7e9.tar.xz
logdiag-bd1b3adf56504f1d0f00c4502e8c241cf3b4a7e9.zip
Update symbol library.
* Workaround the Windows pangocairo bug by drawing text with curves. Remove some of the meters. * Remove terminal lines from meters and voltage sources, add vertical terminal points instead.
Diffstat (limited to 'share/library/Misc/voltage-source.lua')
-rw-r--r--share/library/Misc/voltage-source.lua16
1 files changed, 5 insertions, 11 deletions
diff --git a/share/library/Misc/voltage-source.lua b/share/library/Misc/voltage-source.lua
index 7460305..9b33dc7 100644
--- a/share/library/Misc/voltage-source.lua
+++ b/share/library/Misc/voltage-source.lua
@@ -12,23 +12,17 @@ local names_dc =
}
-- Render area in base units (X1, Y1, X2, Y2)
-local area = {-3, -2, 3, 2}
+local area_ac = {-2, -2, 2, 2}
+local area_dc = {-2, -2, 3, 2}
-- Terminal points
-local terminals = {{-3, 0}, {3, 0}}
+local terminals = {{-2, 0}, {2, 0}, {0, -2}, {0, 2}}
-- Rendering
local render = function (cr)
-- The circle
cr.arc (0, 0, 2, 0, math.pi * 2)
- -- The terminals
- cr.move_to (-3, 0)
- cr.line_to (-2, 0)
-
- cr.move_to (2, 0)
- cr.line_to (3, 0)
-
cr.stroke ()
end
@@ -66,7 +60,7 @@ local render_dc = function (cr)
end
-- Register the symbol
-logdiag.register ("ACSource", names_ac, area, terminals, render_ac)
-logdiag.register ("DCSource", names_dc, area, terminals, render_dc)
+logdiag.register ("ACSource", names_ac, area_ac, terminals, render_ac)
+logdiag.register ("DCSource", names_dc, area_dc, terminals, render_dc)