From 5b2afeec38d0c5635c249eb0eaf946cccce2a073 Mon Sep 17 00:00:00 2001 From: Thomas DAGES Date: Thu, 6 Dec 2018 14:56:46 +0100 Subject: [PATCH] fix self missing + wrong comment --- svg.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/svg.lua b/svg.lua index 6a00720..0a88480 100644 --- a/svg.lua +++ b/svg.lua @@ -56,7 +56,7 @@ function svg:draw() return svgStr end --- INIT Rect element Class +-- function to create a rectangle -- x: number => Position du rectangle sur l'axe horizontal par rapport au coin supérieur gauche -- y: number => Position du rectangle sur l'axe vertical par rapport au coin supérieur gauche -- width: number => Largeur du rectangle @@ -72,8 +72,8 @@ function svg:Rect(x, y, width, height, stroke, strokeWidth, fill, rx, ry) y = y or 10, width = width or 10, height = height or 10, - stroke = stroke or svg.stroke, - fill = fill or svg.fill, + stroke = stroke or self.stroke, + fill = fill or self.fill, ["stroke-width"] = strokeWidth or 1, rx = rx or 0, ry = ry or 0 -- 2.51.2