[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.

added polyline support

Thomas (Jan 8, 2019, 10:34 AM +0100) 64b2effb aaf370e1

+24 -2
+8 -1
README.md
··· 120 120 - y2: number => Vertical radius of the ellipse, default to 15 121 121 - stroke: string => lines color, default to svg:create() parameter ("#000000" by default) 122 122 - strokeWidth: string => lines width, default to 1 123 - - fill: string => fill color, default to svg:create() parameter ("transparent" by default) 123 + - fill: string => fill color, default to svg:create() parameter ("transparent" by default) 124 + 125 + **svg:Line(points, stroke, strokeWidth, fill)** *add a polyline* 126 + 127 + - points: string => all the points of the polyline with the standard svg format "x1,y1 x2,y2 x3,y3 ..." 128 + - stroke: string => lines color 129 + - strokeWidth: string => lines width 130 + - fill: string => fill color
+16 -1
svg.lua
··· 161 161 ["stroke-width"] = strokeWidth or 1, 162 162 fill = fill or self.fill 163 163 }) 164 - end 164 + end 165 + 166 + -- function ro create a polyline 167 + -- points: string => all the points of the polyline with the standard svg format "x1,y1 x2,y2 x3,y3 ..." 168 + -- stroke: string => lines color 169 + -- strokeWidth: string => lines width 170 + -- fill: string => fill color 171 + function svg:Line(points, stroke, strokeWidth, fill) 172 + return self.Element:create("line", { 173 + points = points or "10,10 50,50 50,25 75,25", 174 + stroke = stroke or self.stroke, 175 + ["stroke-width"] = strokeWidth or 1, 176 + fill = fill or self.fill 177 + }) 178 + end 179 +