From a1b79a55d2d70660aa156da460ee2e55ebc99183 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C5=99emysl=20Janouch?=
Date: Sun, 12 Aug 2012 06:10:27 +0200
Subject: Change how Cairo is presented to Lua scripts.
Makes the whole thing a bit more stable and less weird.
---
share/library/Passive/capacitor.lua | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
(limited to 'share/library/Passive/capacitor.lua')
diff --git a/share/library/Passive/capacitor.lua b/share/library/Passive/capacitor.lua
index 121b01d..bd8c408 100644
--- a/share/library/Passive/capacitor.lua
+++ b/share/library/Passive/capacitor.lua
@@ -17,20 +17,20 @@ local terminals = {{-2, 0}, {2, 0}}
-- Rendering
local render = function (cr)
-- The vertical lines
- cr.move_to (-0.2, -1)
- cr.line_to (-0.2, 1)
+ cr:move_to (-0.2, -1)
+ cr:line_to (-0.2, 1)
- cr.move_to (0.2, -1)
- cr.line_to (0.2, 1)
+ cr:move_to (0.2, -1)
+ cr:line_to (0.2, 1)
-- The terminals
- cr.move_to (-2, 0)
- cr.line_to (-0.2, 0)
+ cr:move_to (-2, 0)
+ cr:line_to (-0.2, 0)
- cr.move_to (0.2, 0)
- cr.line_to (2, 0)
+ cr:move_to (0.2, 0)
+ cr:line_to (2, 0)
- cr.stroke ()
+ cr:stroke ()
end
-- Register the symbol
--
cgit v1.2.3