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

Thomas (Dec 10, 2018, 3:06 PM +0100) 7b731b98 00a0d049

+20
+20
svg.lua
··· 141 141 fill = fill or self.fill, 142 142 transform = transform or "" 143 143 }) 144 + end 145 + 146 + -- function ro create a line 147 + -- c1: number => Horizontal postion for point 1 148 + -- y1: number => Vertical position for point 1 149 + -- x2: number => Horizontal position for point 2 150 + -- y2: number => Vertical position for point 2 151 + -- stroke: string => lines color 152 + -- strokeWidth: string => lines width 153 + -- fill: string => fill color 154 + function svg:Line(x1, y1, x2, y2, stroke, strokeWidth, fill) 155 + return self.Element:create("line", { 156 + x1 = r or 15, 157 + y1 = r or 15, 158 + x2 = cx or 50, 159 + y2 = cy or 45, 160 + stroke = stroke or self.stroke, 161 + ["stroke-width"] = strokeWidth or 1, 162 + fill = fill or self.fill 163 + }) 144 164 end