diff options
-rw-r--r-- | share/library/Misc/category.json | 5 | ||||
-rw-r--r-- | share/library/Misc/ground.lua | 36 | ||||
-rw-r--r-- | share/library/Misc/icon.svg | 78 | ||||
-rw-r--r-- | share/library/Misc/lamp.lua | 44 | ||||
-rw-r--r-- | share/library/Misc/power-source.lua | 36 | ||||
-rw-r--r-- | share/library/Misc/switch.lua | 33 |
6 files changed, 232 insertions, 0 deletions
diff --git a/share/library/Misc/category.json b/share/library/Misc/category.json new file mode 100644 index 0000000..8ec3331 --- /dev/null +++ b/share/library/Misc/category.json @@ -0,0 +1,5 @@ +{ + "en": "Miscellaneous", + "cs": "Smíšené" +} + diff --git a/share/library/Misc/ground.lua b/share/library/Misc/ground.lua new file mode 100644 index 0000000..fdcf593 --- /dev/null +++ b/share/library/Misc/ground.lua @@ -0,0 +1,36 @@ +-- Symbol name +names = +{ + en = "Ground", + cs = "Zem" +} + +-- Render area in base units (X1, Y1, X2, Y2) +area = {-1, -1, 1, 2} + +-- Terminals +terminals = {{0, -1}} + +-- Rendering +render = function (cr) + -- The vertical line + cr.move_to (0, -1) + cr.line_to (0, 0.5) + + -- The horizontal lines + cr.move_to (-1, 0.5) + cr.line_to (1, 0.5) + + cr.move_to (-0.75, 1.1) + cr.line_to (0.75, 1.1) + + cr.move_to (-0.5, 1.7) + cr.line_to (0.5, 1.7) + + cr.stroke () +end + +-- Register the symbol +logdiag.register ("Ground", names, area, terminals, render) + + diff --git a/share/library/Misc/icon.svg b/share/library/Misc/icon.svg new file mode 100644 index 0000000..c504a45 --- /dev/null +++ b/share/library/Misc/icon.svg @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + version="1.1" + width="128" + height="128" + id="svg2"> + <defs + id="defs4" /> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + id="g3837"> + <g + transform="translate(120,-10)" + id="g3771" + style="fill:none"> + <path + d="m 140,48 a 25,25 0 1 1 -50,0 25,25 0 1 1 50,0 z" + transform="translate(-180,0)" + id="path2991" + style="stroke:#000000;stroke-width:4;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + d="m -90,48 -15,0" + id="path3761" + style="stroke:#000000;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + d="m -40,48 15,0" + id="path3763" + style="stroke:#000000;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + d="m -80,33 30,30" + id="path3767" + style="stroke:#000000;stroke-width:4;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + d="M -50,33 -80,63" + id="path3769" + style="stroke:#000000;stroke-width:4;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + </g> + <g + transform="translate(0,5)" + id="g3786" + style="fill:none"> + <path + d="m 90,57 0,20" + id="path3778" + style="stroke:#000000;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + d="m 65,77 50,0" + id="path3780" + style="stroke:#000000;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + d="m 70,93 40,0" + id="path3782" + style="stroke:#000000;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + d="m 75,109 30,0" + id="path3784" + style="stroke:#000000;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + </g> + </g> +</svg> diff --git a/share/library/Misc/lamp.lua b/share/library/Misc/lamp.lua new file mode 100644 index 0000000..b662cec --- /dev/null +++ b/share/library/Misc/lamp.lua @@ -0,0 +1,44 @@ +-- Symbol name +names = +{ + en = "Lamp", + cs = "Světelný zdroj" +} + +-- Render area in base units (X1, Y1, X2, Y2) +area = {-2, -1, 2, 1} + +-- Terminals +terminals = {{-2, 0}, {2, 0}} + +-- Rendering +render = function (cr) + -- The circle + cr.save () + + cr.arc (0, 0, 1, 0, 2 * math.pi) + cr.stroke_preserve () + cr.clip () + + cr.move_to (-1, -1) + cr.line_to (1, 1) + + cr.move_to (1, -1) + cr.line_to (-1, 1) + cr.stroke () + + cr.restore () + + -- The contacts + cr.move_to (-2, 0) + cr.line_to (-1, 0) + + cr.move_to (1, 0) + cr.line_to (2, 0) + cr.stroke () +end + +-- Register the symbol +logdiag.register ("Lamp", names, area, terminals, render) + + diff --git a/share/library/Misc/power-source.lua b/share/library/Misc/power-source.lua new file mode 100644 index 0000000..8fd98bb --- /dev/null +++ b/share/library/Misc/power-source.lua @@ -0,0 +1,36 @@ +-- Symbol name +names = +{ + en = "Power source", + cs = "Zdroj napětí" +} + +-- Render area in base units (X1, Y1, X2, Y2) +area = {-1, -2, 1, 2} + +-- Terminals +terminals = {{-1, 0}, {1, 0}} + +-- Rendering +render = function (cr) + -- The vertical lines + cr.move_to (-0.2, -1) + cr.line_to (-0.2, 1) + + cr.move_to (0.2, -2) + cr.line_to (0.2, 2) + + -- The contacts + cr.move_to (-1, 0) + cr.line_to (-0.2, 0) + + cr.move_to (0.2, 0) + cr.line_to (1, 0) + + cr.stroke () +end + +-- Register the symbol +logdiag.register ("PowerSource", names, area, terminals, render) + + diff --git a/share/library/Misc/switch.lua b/share/library/Misc/switch.lua new file mode 100644 index 0000000..9d59fdf --- /dev/null +++ b/share/library/Misc/switch.lua @@ -0,0 +1,33 @@ +-- Symbol name +names = +{ + en = "Switch", + cs = "Spínač" +} + +-- Render area in base units (X1, Y1, X2, Y2) +area = {-2, -1.5, 2, 0} + +-- Terminals +terminals = {{-2, 0}, {2, 0}} + +-- Rendering +render_normal = function (cr) + -- The switch contact + cr.move_to (1.3, -1.3) + cr.line_to (-1, 0) + + -- The contacts + cr.move_to (-2, 0) + cr.line_to (-1, 0) + + cr.move_to (1, 0) + cr.line_to (2, 0) + + cr.stroke () +end + +-- Register the symbol +logdiag.register ("Switch", names, area, terminals, render_normal) + + |