Inkscape.org
Beginners' Questions Move, rotate or scale entire drawing
  1. #1
    wisc95 wisc95 @wisc95

    I've run into a several times in the past few months that i've realized i have my drawing in the wrong place on the page, the wrong orientation, or even the wrong size for what I want to do. This usually occurs after it's already at a dozen layers with hundreds of objects on each layer. Is there an easy way to just move the whole drawing on the page? How about scaling and rotating?

    If I just "select all in all layers", then do the change, there's always something that comes out wrong, sometimes I don't even notice it until after I've done a couple of hours of work. Here's what I end up having to do:

    1) Go through every object and make sure it's unlocked and visible, and keep track of what was changed.

    2) Create a rectangle frame that is centered on the current page and fits around every object in the drawing. Duplicate this shape to every layer. (Without this, different layers have different center points, and therefore rotate and scale into different positions)

    3) In each layer, group all objects into one big group. (Without this, and step 6, the transformation sometimes, but not always, just throws a transform attribute on an object, which can come back to bite me when I edit this object or move it to another group)

    4) Change the page dimensions and orientation.

    5) Select all in all layers, and make the transformation to fit new page.

    6) Ungroup the groups created in step 3, which applies the transformation on the group to all of the objects.

    7) Delete the frame objects created in step 2

    8) Hide and/or lock the objects that were shown and unlocked in step 1.

    Is there some obvious "move drawing" option that I'm missing?

  2. #2
    inklinea inklinea @inklinea⛰️

    I use a work around to centre my drawing onto a page of any size.

    It's easier to move the page instead of the drawing :)

    Press Ctrl + a to select all.

    Press Ctrl + shift + r to resize canvas to the bounding box for all objects ( assuming no objects are hidden)

    Make a rectangle the desired paper size - so for example 210mm x 297 mm for A4.

    Go into Object>Align and distribute and click the drop down in the Align and distribute pane to select relative to 'page'

    Select the rectangle and click centre vertical, then click centre horizontal.

    Press Ctrl + Shift + r to resize document to the rectangle

    Delete the rectangle. 

  3. #3
    inklinea inklinea @inklinea⛰️

    Sorry forgot to mention, if you use this trick it is essential that the stroke of the rectangle is set to 'none', otherwise the stroke width will add to the page dimensions.

  4. #4
    wisc95 wisc95 @wisc95

    Thank you. That would definitely help with moving the drawing on the page. I guess I didn't realize the "Resize canvas to bounding box" could be used to move the page, and I'd never tried it before.

    It doesn't make it any easier to resize or rotate the drawing, though, or at least if it does I don't see how.

  5. #5
    inklinea inklinea @inklinea⛰️

    If the 'select by layers' then rotate or scale isn't working correctly, can you try this ( if you know how to use the terminal or command prompt in windows )

    *Just to mention if you are using Windows, inkscape does not normally get added to the command prompt path, at least on my system. You would need to add it via change enviroment variables/path dialogue in the search bar of the start menu, unless you are happy using c:\program files\inkscape etc etc at the front of the command*

    --------------------------

    Rotate the canvas in Inkscape ( Ctrl+Shift + roll mouse wheel ) or use plus/minus widget on bottom right of inkscape main window. Then write down the rotation angle.

    inkscape --batch-process --actions="select-all;transform-rotate:30;export-filename:transformed.svg;export-do" drawing.svg

    In the line above, I have set the rotation to 30 degrees, the output filename to transformed.svg and the input file is drawing.svg

    Then open transformed svg. See if it is correct, it could just be a selection error in the main program.

     

  6. #6
    Tyler Durden Tyler Durden @TylerDurden

    It might be helpful in this case to remember that layers are specially tagged groups that can be toggled to group mode using the Objects dialog. 

    Toggling the layers into groups will allow scale and rotation of the layers, without the need to select all and group within a layer. The toggle can be flipped back after transforms.

    I can't say with all certainty that this will be helpful in all cases, but might be worth exploring.

Inkscape Inkscape.org Inkscape Forum Beginners' Questions Move, rotate or scale entire drawing