Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for professional graphic designers and non-designers trying to do their own graphic design. It's 100% free, no registration required.

I have a group of 2 objects a circle and a line. Looks like letter Q.

I want to center this group, so that the circle will centered in a page and the line will maintain its relative position to the circle.

Currently when I center the group Inkscape uses the group center not the circle center.

Thank you.

Sample picture:

Notice how this group is aligned to page center. I want to align it so that the circle is in the center.

enter image description here

share|improve this question
    
not entirely clear the question, but if you first group the Q and the Line, then it'll center as if it were one object. –  DA01 Nov 12 '11 at 0:08
    
what is not clear? –  Kugel Nov 12 '11 at 13:25
    
@Kugel , its quite clear what you need to do... –  Flavius Frantz Nov 12 '11 at 15:05
add comment

2 Answers

up vote 1 down vote accepted

Thanks for the picture. It's much clearer now. The solution I'd use is to create a bounding box of around each element, group those, then center the two groups. When finished, delete the bounding boxes. Example:

+---------------++----------------+
|     xxxxx     ||                |
|   xx     xx   ||                |
|  xx        x  ||                |
|  x          x ||                |
| x           x ||         x      |
|  x         x  ||          xx    |
|   xx     xx   ||            xx  |
|     xxxxx     ||              x |
+---------------++----------------+

The circle+square is one group, the line+ square is the other. You can now center them together while the line retains its relative position to the circle.

You can also consider looking into all of the 'snap to point' options in Inkscape. There many, many options and it's a bit confusing at first, but they can help greatly in aligning objects together on the page.

Another option:

  1. copy the circle
  2. position your circle wherever you intend to put it (via centering if you wish)
  3. When you have it in the right position, drag the line and circle as a group and use snap-to-point to snap it into place.
  4. Delete the copied circle
share|improve this answer
    
how does this make the center of the circle to become the center of the group ? i think im a bit homer simpsonish... explain some more please...duh! –  Flavius Frantz Nov 12 '11 at 20:18
    
or maybe it doesn't make the circle the center of the group, you make the boxes just to know where the line is supposed to go after you center the circle ? hmz.z... your example seems so right but I don't get... maybe its too late or smthing.. –  Flavius Frantz Nov 12 '11 at 20:24
    
How do I create rectangle from bounding box? –  Kugel Nov 12 '11 at 23:15
    
@Kugel: you'd draw it. Flavius: if you first center the circle and the square, then the center of the circle is the same as the center of the square. You then group that as one object and do the same with line using the exact same size square. –  DA01 Nov 12 '11 at 23:39
    
So, in otherwords, you're now just centering equal sized objects: squares. When you are finished, ungroup things and delete the boxes. –  DA01 Nov 12 '11 at 23:40
show 7 more comments

It kind of tricky what you are trying to do... I can think of two ways, although I don't work with Inkscape but Illustrator:

  1. Simple and most obvious, align the circle first and the reposition the line. But I get the feeling this is not something that didn't cross your mind already

  2. Make the member you want to center(your circle) be in the center of the group.

First ungroup your objects and make another group, in this new group add another object... an invisible line (a object with opacity set to 0) positioned exactly as your original line but in the opposite direction. I have an image to explain this technique :

enter image description here

To position this line exactly as the other line use the Align features such as Horizontal Distribute center and Vertical Distribute center...

Then after you have this new grouped object the center should be again in the center of the circle... hope you understand all this... its kind of ... invented on the spot... but it worked for me.. if you need further explanation just ask! :)

You don't really need to set the opacity of your new line to 0, you can simply delete it after the job is done... I was just thinking maybe you might need it later again so its better to leave it there untill you know you wont need it again, but you set the opacity to 0 so you don't see it...

This is much easyer to do in Flash, where you can move an objects(Symbol in Flash) Registration Point, if that exists in Inkscape... then, just do that...

share|improve this answer
    
Thanks this is much clearer than the other answer. I will experiment with horizontal & vertical distribute. –  Kugel Nov 12 '11 at 22:58
    
This is a good option, Flavius. The ultimate goal is to be able to center the circle in a group of object and that group can them be centered, preserving the relative position of everything. –  DA01 Nov 12 '11 at 23:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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