How to Automatically Clip Objects?

Post questions on how to use or achieve an effect in Inkscape.
silverhammermba
Posts: 3
Joined: Wed Jan 06, 2010 1:53 am

How to Automatically Clip Objects?

Postby silverhammermba » Mon Jan 11, 2010 9:24 am

Basically I want to clip object A by object B in such a way that if I edit B afterwards, A reflects this change.

I can sort of get the results I want by cloning B and clipping A by the clone. But this has several limitations:
1. I have to redo the process every time I add a new object to be clipped by B.
2. If I move either object after clipping, there is no change to B because the clone gets moved around by A and not by B.
3. This process doesn't play nicely with groups, so clipping a lot of objects by B gets very tedious.

IIRC, this is very easy to do in Adobe Illustrator by simply dragging A onto B in the Layers window.

I desperately want to know if Inkscape has an equivalent method because it's driving me nuts to the point that I want to give up Inkscape for Illustrator.

User avatar
kelan
Posts: 178
Joined: Thu Sep 06, 2007 12:55 am
Location: Unicorn of Open Source
Contact:

Re: How to Automatically Clip Objects?

Postby kelan » Tue Jan 12, 2010 1:59 am

I don't completely understand what you mean by your point #1. Are you adding new objects to a collection that are all clipped at once, or are you adding a new object that is clipped, but separate from the others? In the second case, you'll need to clip everything individually, yes. In the first case, you can use a group. I'll explain more below.

There's an Inkscape preference (Shift+Ctrl+p) in the Clones settings that will move a clone when the original moves. You want the "move in parallel" option.

Can you be more specific when you say the process doesn't play nicely with groups? I've never had any problems clipping a group, or using a group as the clip path. It probably won't match the ease of Illustrator, but here's what you can do.

If you're going to end up clipping a bunch of objects by the same object B, start by grouping the first one, essentially forming a one-object group. Then set the clip on that group. Thereafter, when you need to add another object, you can "enter" the group by either double-clicking on it, or selecting it and pressing Ctrl+Enter. You can tell you've entered the group because the layer selection droplist in the status bar will say something like "#g2930". Now, any object you create will be created as part of that group, and thus automatically clipped. You can "leave" the group by double-clicking an empty part of the canvas or selecting an object that doesn't belong to the group. You can also move objects in the group around while leaving the clip in place by Ctrl-selecting an object and just moving it around like normal. Ctrl-selecting allows you to select an object inside of a group instead of the group itself.

If you know you'll want to add objects to the clip path, create a group around the first clipping object (object B in your example), and then clone that group and use the clone as the clip path. Then you can enter the original group, as described above, at any time to add objects to the clip path, move them around, etc.

When using the Node tool :tool_node:, there is also a toolbar button to "edit the clipping path of the object". The icon is near the right end, and looks like a small green curve with some black curves coming out of it. It's only enabled when the currently selected object has a clip path and you're using the Node tool. You can use that if the clip path is just one object. It won't work on a group used as a clip path.

Hopefully some of these tips are useful. Let me know if any of my descriptions are unclear.


Return to “Help with using Inkscape”