1

I have an SVG which has bbox of something like

SVGRect {x: 236.92999267578125, y: 99.98999786376953, width: 121.48001098632812, height: 224.70001220703125}

How can I use Inkscape to position the graphic to the top left of the canvas so that the x & y values above are zero.

Edit: I have figured out using the align & distribute panel. However, inkscape is applying transformation & not actually changing the path co-ordinates, which is what I actually want. enter image description here

--- EDIT --- As per @Scribblemacher's request, here is a sample.

I want this:

<g transform=(-10, -10)>
  <path d="M329.66,99.99l22.1,4c0,0-14.5,52.9-2.1,51.6c0,0-11.7,72.7-10,83.7
        c0,0,18.8,81.1,17.3,85.4...>

to be converted into this:

<g>
  <path d="M319.66,88.99l22.1,4c0,0-14.5,52.9-2.1,51.6c0,0-11.7,72.7-10,83.7
            c0,0,18.8,81.1,17.3,85.4...>"

In other words, the transformation should be mapped onto the individual paths of the group, the actual co-ordinates of the path. The above 'M329.66,88.99' becomes 'M319.66,99.99'. Hope that makes sense.

1
  • Maybe I'm missing something but can't you just open the SVG in a text editor and change the X and Y?
    – Cai
    May 17, 2016 at 12:07

1 Answer 1

3

If I understand the problem, there are several ways to do this:

  • Enable the "Snap to page border" snapping option, then just drag the object towards the corner
  • With the object selected, you can manually set the X and Y coordinates from the toolbar
  • With the object selected, press Ctrl+Shift+X to open the XML editor and change the X and Y manually
3
  • Thanks for getting back to me. I tried the first two, however, they append transform attribute on the <g> group. What I want is for Inkscape to update the co-ordinate values for each path based on the new position of Top Left.
    – Kayote
    May 17, 2016 at 22:35
  • Can you update your question with a sample SVG (either the image or the code) that exhibits this problem? I can't replicate it in Inkscape 0.91. When I do any movement actions with the object, it's applying it to the x and y of the <g>, not adding a transform attribute. May 18, 2016 at 1:09
  • Yes, thats what it is doing on my system as well. Perhaps, I wasn't clear enough. I want the transform to be applied on the individual <Path> element. Im updating the question with a sample, thanks.
    – Kayote
    May 18, 2016 at 7:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.