ajstarks / svgo

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

Including units and floating point values #42

Closed ryankurte closed 6 years ago

ryankurte commented 6 years ago

Hey, thanks for making a neat package!

I might have missed this feature, but, have you considered support for floating point and specified unit types (eg. x=10.5cm) ?

Happy to do the refactor to replace the instances of int with a float/unit type if you'd be interested.

Cheers,

Ryan

ajstarks commented 6 years ago

Thanks for the kind words.

Floating point is supported: import github.com/ajstarks/svgo/float To specify units use Startunit or StartviewUnit

ryankurte commented 6 years ago

Thanks for the help! I had found StartUnit but not /float so was very confused about how to set fractional parts.