[READ-ONLY] Mirror of https://github.com/thoda-dev/svg-lua. svg lua library
0

Configure Feed

Select the types of activity you want to include in your feed.

fix wrong function name for Polyline and added to test file

Thomas (Jan 8, 2019, 10:37 AM +0100) f053614a e3953b18

+3 -2
+1 -1
README.md
··· 122 122 - strokeWidth: string => lines width, default to 1 123 123 - fill: string => fill color, default to svg:create() parameter ("transparent" by default) 124 124 125 - **svg:Line(points, stroke, strokeWidth, fill)** *add a polyline* 125 + **svg:Polyline(points, stroke, strokeWidth, fill)** *add a polyline* 126 126 127 127 - points: string => all the points of the polyline with the standard svg format "x1,y1 x2,y2 x3,y3 ..." 128 128 - stroke: string => lines color
+1 -1
svg.lua
··· 168 168 -- stroke: string => lines color 169 169 -- strokeWidth: string => lines width 170 170 -- fill: string => fill color 171 - function svg:Line(points, stroke, strokeWidth, fill) 171 + function svg:Polyline(points, stroke, strokeWidth, fill) 172 172 return self.Element:create("line", { 173 173 points = points or "10,10 50,50 50,25 75,25", 174 174 stroke = stroke or self.stroke,
+1
test.lua
··· 12 12 mon_dessin:add(mon_dessin:Circle()) 13 13 mon_dessin:add(mon_dessin:Ellipse()) 14 14 mon_dessin:add(mon_dessin:Line()) 15 + mon_dessin:add(mon_dessin:Polyline()) 15 16 print(mon_dessin:draw())