nornagon / saxi

Tools & library for driving the AxiDraw pen plotter
GNU Affero General Public License v3.0
466 stars 54 forks source link

Bug: disabling 'fit page' does not respect SVG scale #42

Closed abey79 closed 4 years ago

abey79 commented 4 years ago

Consider the following SVG as seen in InkScape: unknown Once loaded in saxi, the scale is clearly not respected: unknown-2

Here is the SVG file: vader_10cm_opt.svg.zip

It may be that the width and height attributes of the svg tag are not considered. (Note that in this present SVG, the viewBox attribute is omitted, but should be honoured as well.)

abey79 commented 4 years ago

FWIW, here is how I do it in vpype. I'm using SVG pixels (1/96th of an inch) internally, thus the scale factor of 1 when viewBox is omitted. You'll need some further scaling for whatever units you are using internally.

nornagon commented 4 years ago

Should be fixed by 05b0b7b, will release shortly. Not sure yet if it correctly handles viewbox, but your test svg seems to work correctly at least!