PadLex / SvgToGcode

MIT License
46 stars 27 forks source link

Fix bug in viewBox handling when the offset contains a negative #21

Closed amcewen closed 2 years ago

amcewen commented 2 years ago

Found a bug in the viewBox parsing that I added recently. If the x or y values are negative the parsing fails and so the viewBox isn't applied.

I've implemented a fix, and added a new test case. It falls foul of the linear approximation test in the same way that the original viewBox test case does, because the approximation test doesn't apply the viewBox transformation - I've not had time to work out a fix for that I'm afraid.