When I create a, for example a rectangle, with a height, width, x & y parameters using the tool the numbers are different in the svg save file. I can't see the relation. I'm using the save file values to generate these shapes in another tool but the values are throwing me off. I've attached some images below.
The values are correct when I reload the image into inkscape so what is inkscape doing to these values?
Different values in svg save file than in tool itself
Different values in svg save file than in tool itself
- Attachments
-
- Capture2.PNG (14.57 KiB) Viewed 1315 times
-
- Capture.PNG (141.58 KiB) Viewed 1315 times
-
- Posts: 70
- Joined: Fri Apr 22, 2016 8:32 am
Re: Different values in svg save file than in tool itself
in your SVG find this line.
inkscape:document-units="mm" <---Mine says mm but in inkscape I'm on px
on a 500x500 px
width="132.29167"
height="132.29167"
So chances are your SVG has a different save units and your other program is ignoring this format change.
Check under Document properties to change both screen and file save to the unit order you require.
ShawnWDion
inkscape:document-units="mm" <---Mine says mm but in inkscape I'm on px
on a 500x500 px
width="132.29167"
height="132.29167"
So chances are your SVG has a different save units and your other program is ignoring this format change.
Check under Document properties to change both screen and file save to the unit order you require.
ShawnWDion
-
- Posts: 2344
- Joined: Sun Apr 14, 2013 12:04 pm
- Location: Michigan, USA
Re: Different values in svg save file than in tool itself
There are at least three things happening:
1) Inkscape screen coordinates have 0,0 at bottom-left, svg coordinates have 0,0 at top-left. Inkscape does the conversion.
2) If the object(s) have been moved or scaled (transforms) this may be reflected in the transform matrix until saving, depending on the setting in prefs.
3) The bounding box location and dimension can show a difference from the xml depending on the setting in prefs.
4) External tools may scale differently than Inkscape, depending on the version of the external tool and the version of Inkscape you are using.
1) Inkscape screen coordinates have 0,0 at bottom-left, svg coordinates have 0,0 at top-left. Inkscape does the conversion.
2) If the object(s) have been moved or scaled (transforms) this may be reflected in the transform matrix until saving, depending on the setting in prefs.
3) The bounding box location and dimension can show a difference from the xml depending on the setting in prefs.
4) External tools may scale differently than Inkscape, depending on the version of the external tool and the version of Inkscape you are using.
Have a nice day.
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
Re: Different values in svg save file than in tool itself
From the values, this looks to me as if the stroke of your rectangle causes the difference. The stroke doesn't count to a rectangle's width in the svg, but it may count into the values displayed for the selection tool, depending on the setting about the bounding box to use (Edit -> Preferences -> Tools: Bounding Box to use).
If you remove the stroke (so the visual and geometrical bounding boxes are identical), both sizes should match, unless there is some other kind of additional conversion going on, as described by tylerdurden in 2).
If you remove the stroke (so the visual and geometrical bounding boxes are identical), both sizes should match, unless there is some other kind of additional conversion going on, as described by tylerdurden in 2).
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)