2011-01-07 16:25:15 +01:00
|
|
|
-- Symbol name
|
2011-02-09 14:18:22 +01:00
|
|
|
local names =
|
2011-01-07 16:25:15 +01:00
|
|
|
{
|
|
|
|
en = "NOT",
|
2011-03-04 17:47:04 +01:00
|
|
|
cs = "NOT",
|
2011-03-06 21:34:21 +01:00
|
|
|
sk = "NOT",
|
2011-03-07 06:11:44 +01:00
|
|
|
pl = "NOT",
|
|
|
|
de = "NICHT"
|
2011-01-07 16:25:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
-- Render area in base units (X1, Y1, X2, Y2)
|
2011-02-09 14:18:22 +01:00
|
|
|
local area = {-4, -2, 4, 2}
|
2011-01-07 16:25:15 +01:00
|
|
|
|
2011-02-11 18:37:00 +01:00
|
|
|
-- Terminal points
|
2011-02-09 14:18:22 +01:00
|
|
|
local terminals = {{-4, 0}, {4, 0}}
|
2011-01-07 16:25:15 +01:00
|
|
|
|
|
|
|
-- Rendering
|
2011-02-09 14:18:22 +01:00
|
|
|
local render = function (cr)
|
2011-01-07 16:25:15 +01:00
|
|
|
-- The triangle
|
2012-08-12 06:10:27 +02:00
|
|
|
cr:move_to (-2, -2)
|
|
|
|
cr:line_to (2, 0)
|
|
|
|
cr:line_to (-2, 2)
|
|
|
|
cr:close_path ()
|
2011-01-07 16:25:15 +01:00
|
|
|
|
|
|
|
-- The circle
|
2012-08-12 06:10:27 +02:00
|
|
|
cr:new_sub_path ()
|
|
|
|
cr:arc (2.25, 0, 0.25, 0, 2 * math.pi)
|
2011-01-07 16:25:15 +01:00
|
|
|
|
2011-02-11 18:37:00 +01:00
|
|
|
-- The terminals
|
2012-08-12 06:10:27 +02:00
|
|
|
cr:move_to (-4, 0)
|
|
|
|
cr:line_to (-2, 0)
|
2011-01-07 16:25:15 +01:00
|
|
|
|
2012-08-12 06:10:27 +02:00
|
|
|
cr:move_to (2.5, 0)
|
|
|
|
cr:line_to (4, 0)
|
2011-02-11 18:37:00 +01:00
|
|
|
|
2012-08-12 06:10:27 +02:00
|
|
|
cr:stroke ()
|
2011-01-07 16:25:15 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
-- Register the symbol
|
|
|
|
logdiag.register ("NOT", names, area, terminals, render)
|
|
|
|
|
|
|
|
|