Anchoring objects to other objects?

Post questions on how to use or achieve an effect in Inkscape.
acebone
Posts: 11
Joined: Wed Aug 18, 2010 1:23 am

Anchoring objects to other objects?

Postby acebone » Mon Aug 13, 2012 10:00 pm

Hi,

I'm doing a big template for the grafix needed in my smartphone development.

To help find stuff in the template, I use rectangles with no fill, only stroke, to make big 'frames' where I group objects logically. Ie. 'icons', 'iPhone', 'Android' etc ...

The 'frames' are grouped with textobject next to them, where the title of the frame is written.

Sometimes I need to resize the frames, and that of course resizes the labels too - so I have two questions:


1. All objects in Inkscape have a property called 'label' - is there any way to show these labels?

2. Is it possible to place objects relative to other objects.
Like: the bottom of object A is always aligned with the top of object B. Resizing A won't affect B's size, but it might move B so that it's bottom is still aligned with A's top

TIA!

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

Re: Anchoring objects to other objects?

Postby brynn » Wed Aug 15, 2012 1:36 am

Hi acebone,
I'm probably not the best person to answer your questions. But I can offer some observations, and possibly even answer your 2nd question, until someone more knowledgeable comes along :D

I see that there are 2 places where the word "label" appears. In the XML, "label" appears to be associated with the Layer name. So perhaps you have each object in its own layer? But I also see the in Object Properties, each object, irrespective of layers, does have it's own ID, and the "Label" property is the ID with a "#" in front of it (unless you change it).

I'm not sure where it is that you want to display the label name? If you're using the Inkscape gui, the Layer names are displayed either in the Layer dialog (if you have it open) or at the bottom of the window. In the XML Editor, the ID/label is associated with each object. It sounds like you want to display the ID/label on the canvas?? If that's the case, the only way I know of, would be to use the Text tool, and create text object. Or maybe using a script you could acquire the ID/label and have it written on the canvas.

For your 2nd question, you can align objects relative to each other using Object menu > Align and Distribute. But if you resize one of them, and you resize from the center, they will become unaligned. I don't know of a way to keep them automatically always aligned.....well, except maybe via script.

It is possible to resize or scale objects, not from the center. For example, if you have objects aligned at the bottom, you could scale them so that they increase or decrease in size from the bottom. In that method of scaling, you'd pretty much have to use the Selection tool, though, which is hard to be precise, if you need precise sizing.

Oh ok, now I've re-read your question, and that's not exactly what you're asking. But I'll leave that info there, in case some of it might still be helpful.

There are a few ways to align objects easily with Inkscape, like top of one to bottom of the other. But none that will keep them aligned, when the size of one object is changed. I think you could probably write a script that would do that, but I know nothing about writing scripts.

Ok, so I'll leave it there, with my apologies, because I know it's not a really strong response. But at least you have something to go on, until someone with more expertise comes along :D


Return to “Help with using Inkscape”