Fix transistor symbols.

This commit is contained in:
Přemysl Eric Janouch 2011-02-19 22:31:40 +01:00
parent f074bc6742
commit 8f8866ffc4
2 changed files with 16 additions and 14 deletions

View File

@ -1,11 +1,11 @@
-- Symbol names
local names_igfet_n =
local names_n =
{
en = "N-channel IGFET transistor",
cs = "Tranzistor IGFET s kanálem N"
}
local names_igfet_p =
local names_p =
{
en = "P-channel IGFET transistor",
cs = "Tranzistor IGFET s kanálem P"
@ -15,7 +15,8 @@ local names_igfet_p =
local area = {-2, -1.5, 2, 1.5}
-- Terminal points
local terminals = {{-2, 1}, {2, 1}, {2, 0}, {2, -1}}
local terminals_n = {{-2, 1}, {2, 1}, {2, 0}, {2, -1}}
local terminals_p = {{-2, -1}, {2, 1}, {2, 0}, {2, -1}}
-- Rendering
local render = function (cr)
@ -45,7 +46,7 @@ local render = function (cr)
cr.stroke ()
end
local render_igfet_n = function (cr)
local render_n = function (cr)
render (cr)
-- The left-side terminal
@ -60,7 +61,7 @@ local render_igfet_n = function (cr)
cr.stroke ()
end
local render_igfet_p = function (cr)
local render_p = function (cr)
render (cr)
-- The left-side terminal
@ -76,7 +77,7 @@ local render_igfet_p = function (cr)
end
-- Register the symbols
logdiag.register ("IGFET-N", names_igfet_n, area, terminals, render_igfet_n)
logdiag.register ("IGFET-P", names_igfet_p, area, terminals, render_igfet_p)
logdiag.register ("IGFET-N", names_n, area, terminals_n, render_n)
logdiag.register ("IGFET-P", names_p, area, terminals_p, render_p)

View File

@ -1,11 +1,11 @@
-- Symbol names
local names_jfet_n =
local names_n =
{
en = "N-channel JFET transistor",
cs = "Tranzistor JFET s kanálem N"
}
local names_jfet_p =
local names_p =
{
en = "P-channel JFET transistor",
cs = "Tranzistor JFET s kanálem P"
@ -15,7 +15,8 @@ local names_jfet_p =
local area = {-2, -1.5, 2, 1.5}
-- Terminal points
local terminals = {{-2, 1}, {2, 1}, {2, -1}}
local terminals_n = {{-2, 1}, {2, 1}, {2, -1}}
local terminals_p = {{-2, -1}, {2, 1}, {2, -1}}
-- Rendering
local render = function (cr)
@ -33,7 +34,7 @@ local render = function (cr)
cr.stroke ()
end
local render_jfet_n = function (cr)
local render_n = function (cr)
render (cr)
-- The left-side terminal
@ -48,7 +49,7 @@ local render_jfet_n = function (cr)
cr.stroke ()
end
local render_jfet_p = function (cr)
local render_p = function (cr)
render (cr)
-- The left-side terminal
@ -64,7 +65,7 @@ local render_jfet_p = function (cr)
end
-- Register the symbols
logdiag.register ("JFET-N", names_jfet_n, area, terminals, render_jfet_n)
logdiag.register ("JFET-P", names_jfet_p, area, terminals, render_jfet_p)
logdiag.register ("JFET-N", names_n, area, terminals_n, render_n)
logdiag.register ("JFET-P", names_p, area, terminals_p, render_p)