Align text with object

Post questions on how to use or achieve an effect in Inkscape.
robato_se
Posts: 3
Joined: Tue Jul 03, 2012 3:42 am

Align text with object

Postby robato_se » Tue Jul 03, 2012 3:52 am

I'm making a lot of geometrical shapes for calculating area, they are supposed to be used by students in math. I would like to add a text under the geometrical shape and group the objects so I can change the size of the shape and the text will follow. The problem is that when I do this the text is scaled unsymmetrical and looks strange, is there a way to get around this problem? What I want to achieve is a text which is centered under a rectangle and keeps its size when I'm transforming the rectangle. Can somebody help me?

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Align text with object

Postby brynn » Tue Jul 03, 2012 10:55 am

Image
Welcome to InkscapeForum!

Ok, let me get clear on what you're doing. You'll have, for example, a rectangle, and beneath the rectangle will be some text. And the text and triangle are grouped. Correct? There are a few ways to scale things. Here's one that will scale from the center of the object (the group, in this case) and thereby scale symmetrically. Using the Selection tool, click on the group. Hold down both Ctrl and Shift key, then grab any corner arrow handle and drag it.

But before you scale it, I'd suggest centering the text. And also it will be easier to center it before you group it with the rectangle/shape. Open Object menu > Align and Distribute. Set "Relative to" to 'Last selected'. Select the text first, and the shape last, then click "Center on vertical axis" button. (Or you could do relative to first selected, and select the shape first and text last.)

Now you can group them and scale as necessary. As long as you use the keys I mentioned, the scaling will be symmetrical. :D

robato_se
Posts: 3
Joined: Tue Jul 03, 2012 3:42 am

Re: Align text with object

Postby robato_se » Wed Jul 04, 2012 6:12 am

Thanks for your reply! The problem is that I don't always scale symmetrialy. If I create a rectangle with dimension 10 x 6 cm and center the text and group them and after that try to scale the rectangle into dimension 15 x 6 cm the text will look strange. What I would like to do is to scale the rectangle without any changes to the text. Is this possible in Inkscape!

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Align text with object

Postby brynn » Wed Jul 04, 2012 12:50 pm

Oh, maybe I misread your original message. You want to scale the rectangle without scaling the text? If you do Ctrl + click on the rectangle, it will select only the rectangle out of the group. But if you scale the rectangle un-symmetrically, the text will have to be recentered.....unless you only scale the rectangle vertically. If you need to recenter the text, set Align and Distribute relative to Last selected. Ctrl + click the text, then hold Shift, then Ctrl + click the rectangle. (Or use First selected, and select the rectangle first, text 2nd.) Then click "Center on vertical axis". Or instead of Ctrl + click, you could ungroup them temporarily, and group again when finished.

Have I covered everything you need? Or do I still not understand?

robato_se
Posts: 3
Joined: Tue Jul 03, 2012 3:42 am

Re: Align text with object

Postby robato_se » Wed Jul 04, 2012 5:55 pm

You understand perfectly! Thanks a lot for your help!


Return to “Help with using Inkscape”