Closed peterennis closed 2 years ago
Could you post your default Inkscape document? (For example, create a new document and immediately save it.) I wonder if the problems you're seeing here and in #24 stem from your having a very different default page size from what I'm using. Here's what the speedometer looks like on my system:
Aha! I was able to reproduce the strange-looking speedometer using new_drawing.svg
. Further investigation revealed the source of the discrepancy: All Simple Inkscape Scripting examples work in terms of user-space units, which are typically SVG pixels (@ ~3.5px/mm). However, new_drawing.svg
sets the view box such that one user-space unit is 1mm, making all Simple Inkscape Scripting coordinates, distances, and thicknesses 3.5x larger. Here's what my Document Properties, Page tab looks like for A4 paper:
Note in particular the scale of 3.77 user units/mm where your document has a scale of 1 user unit/mm. (I don't know why mine isn't 3.5, though.)
I don't believe this is something that needs to be "fixed", as a Simple Inkscape Scripting user may actually want his scripts to work in terms of millimeters or other coordinates. (SVG even supports different horizontal and vertical scaling.) It does imply that user-space units much different from 1 per pixel will lead to some odd renderings of the example scripts, though.
I changed some code parameters and can get this result:
Commit here: https://github.com/peterennis/SimpInkScr/commit/324d0e37177d13cb963ab93d4d8707f78dcfd736