ajstarks / svgo

Go Language Library for SVG generation
Other
2.14k stars 169 forks source link

No floating-point-constants in polyline coordinates possible #30

Closed fawick closed 8 years ago

fawick commented 8 years ago

From what I understood from https://www.w3.org/TR/SVG11/shapes.html#PointsBNF, the coordinates for polylines and polygons may consist of floating point numbers.

I wonder why svgo uses []int instead of []float in func (svg *SVG) Polyline(x []int, y []int, s ...string).

ajstarks commented 8 years ago

You may use the svgo/float package.

fawick commented 8 years ago

Oh, cool, thanks, that's just what I was looking for! I did not grok that ./float was not yet another example.