Why Inkscape export wrong Y value?

Discuss SVG code, accessible via the XML Editor.
3D-kreativ
Posts: 5
Joined: Thu Jul 02, 2015 6:31 pm

Why Inkscape export wrong Y value?

Postby 3D-kreativ » Fri Feb 17, 2017 5:55 pm

Hi!

I'm testing to export a small Inkscape drawing with a size within 100 x 100 pixels to a HTML5 page. But why do I get the value like the ones I get in the exporting code below?

If I paste this code within the SVG tag it's not visible and I have to change it myself to something like X= 1 and Y = 1 to see the drawing. Should it not be 1 or 0 for both values as default since a drawing in SVG starts in the upper left corner for both X and Y values!?

I also wonder why the Y value of the object in Inkscapes rulers isn't in the upper left top of the object and has a downwards value like the X value that begins in the upper left corner with a positive value to the right? Can I change this or is this a default setting?

Preciate some help! Thanks!

Code: Select all

<rect style="stroke:#999;stroke-width:5;fill:#bcd35f" transform="rotate(6.7773)" rx="0" ry="3" height="80" width="80" y="949.46" x="127.94"/>

Moini
Posts: 2053
Joined: Mon Oct 05, 2015 10:44 am

Re: Why Inkscape export wrong Y value?

Postby Moini » Sun Feb 19, 2017 4:16 am

Make sure that the part of the picture is on the page (within the viewbox). The rectangle in your drawing seems to be located at 127.94, 949.46 - which may or may not be within the viewbox of the svg you're inserting it in (probably not, if the svg you're copying it into is just 100x100 px wide...)

Why don't you just use the svg you created with Inkscape? You can reduce its file size and remove all the stuff that is only needed by Inkscape by saving as Optimized SVG.
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)


Return to “SVG / XML Code”

Who is online

Users browsing this forum: No registered users and 2 guests