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

path and polyline transform support

Thomas (Jan 8, 2019, 1:55 PM +0100) ed02dd64 1eddf62e

+6 -4
+6 -4
svg.lua
··· 159 159 y2 = cy or 45, 160 160 stroke = stroke or self.stroke, 161 161 ["stroke-width"] = strokeWidth or 1, 162 - fill = fill or self.fill 162 + fill = fill or self.fill, 163 + transform = transform or "" 163 164 }) 164 165 end 165 166 ··· 168 169 -- stroke: string => lines color 169 170 -- strokeWidth: string => lines width 170 171 -- fill: string => fill color 171 - function svg:Polyline(points, stroke, strokeWidth, fill) 172 + function svg:Polyline(points, stroke, strokeWidth, fill, transform) 172 173 return self.Element:create("polyline", { 173 174 points = points or "10,10 50,50 50,25 75,25", 174 175 stroke = stroke or self.stroke, 175 176 ["stroke-width"] = strokeWidth or 1, 176 - fill = fill or self.fill 177 + fill = fill or self.fill, 178 + transform = transform or "" 177 179 }) 178 180 end 179 181 ··· 182 184 -- stroke: string => lines color 183 185 -- strokeWidth: string => lines width 184 186 -- fill: string => fill color 185 - function svg:Path(d, stroke, strokeWidth, fill) 187 + function svg:Path(d, stroke, strokeWidth, fill, transform) 186 188 return self.Element:create("path", { 187 189 d = d or "M50 0 L75 100 L25 100 Z", 188 190 stroke = stroke or self.stroke,