Add some miscellaneous symbols.

This commit is contained in:
Přemysl Eric Janouch 2011-02-07 10:52:02 +01:00
parent 1277b6eaaf
commit 00d9072c5b
6 changed files with 232 additions and 0 deletions

View File

@ -0,0 +1,5 @@
{
"en": "Miscellaneous",
"cs": "Smíšené"
}

View File

@ -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)

View File

@ -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>

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -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)

View File

@ -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)

View File

@ -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)