···120120 - y2: number => Vertical radius of the ellipse, default to 15
121121 - stroke: string => lines color, default to svg:create() parameter ("#000000" by default)
122122 - strokeWidth: string => lines width, default to 1
123123- - fill: string => fill color, default to svg:create() parameter ("transparent" by default)123123+ - fill: string => fill color, default to svg:create() parameter ("transparent" by default)
124124+125125+**svg:Line(points, stroke, strokeWidth, fill)** *add a polyline*
126126+127127+ - points: string => all the points of the polyline with the standard svg format "x1,y1 x2,y2 x3,y3 ..."
128128+ - stroke: string => lines color
129129+ - strokeWidth: string => lines width
130130+ - fill: string => fill color
+16-1
svg.lua
···161161 ["stroke-width"] = strokeWidth or 1,
162162 fill = fill or self.fill
163163 })
164164-end164164+end
165165+166166+-- function ro create a polyline
167167+-- points: string => all the points of the polyline with the standard svg format "x1,y1 x2,y2 x3,y3 ..."
168168+-- stroke: string => lines color
169169+-- strokeWidth: string => lines width
170170+-- fill: string => fill color
171171+function svg:Line(points, stroke, strokeWidth, fill)
172172+ return self.Element:create("line", {
173173+ points = points or "10,10 50,50 50,25 75,25",
174174+ stroke = stroke or self.stroke,
175175+ ["stroke-width"] = strokeWidth or 1,
176176+ fill = fill or self.fill
177177+ })
178178+end
179179+