I have two objects A and B that need to be both visible. B is on top of A. I want object B to be clipped to A's boundary. I am using Inkscape 0.92.

Currently how I am doing this is that I am making a copy of A, then clipping B to A's copy. The disadvantage of this is that whenever I want to edit either A or B in ways that will affect their boundary, I need to remove the clip on B and delete the copy of A, make the changes to either or both of A and B, copy A again, and then clip B again to the copy of A.

Is there a better way? Ideally one where B is effectively "live-clipped" to A?


The graphics are a bit simplified to what I am actually working with, but I hope it will illustrate the point:

I start with one object, with its some gradient defined on it:

enter image description here

I am placing another object on top with its own gradient:

enter image description here

And the effect I am after is thus:

enter image description here

As I said, these objects are a bit simplified to what I am actually working with, and have much more convoluted boundaries, but I hope that it is still clear what I am trying to do.

I can do this, as I said, by making a copy of the first object, moving that copy to the top, additionally selecting the second object, and then setting the clip. But if I ever modify the boundary of the larger object, then I have to delete the clip object and start over. I'd ideally like to be able to edit the boundary of the first object and have it immediately impact how the second object gets clipped.

  • Can you provide some images/screenshots of the problem. I can't really follow the description. There may be a possible work around, but without seeing exactly what you are trying to achieve, it's nearly impossible to answer. – Billy Kerr Apr 20 '18 at 15:08
  • I've added an example that I hope will illustrate what I hoping to do. I'm not able to provide actual screenshots of the images that I am actually using. – Mark Apr 20 '18 at 16:55
  • Thanks for that, yes there's a way. I'm going to add an answer now. – Billy Kerr Apr 20 '18 at 17:17

One way to do this is with clones.

If you use a clone of the object that is to act as the clipping mask, this can indeed be done - as you say, like a live clipping path.

What I have done here is clone the original, which is object A, Object B on top, then another copy of the clone is applied to Object B as a clipping mask.

If you keep the original copy (which is now acting as the clone source), you can edit the path, and it will update the clipped image, and the clones.

enter image description here

  • I'm not sure what I'm doing wrong.... when I clone A, it says something about the clone being orphan, but if I then additionally select object B and specify Object->Clip->Set, object B disappears! – Mark Apr 20 '18 at 18:31
  • Okay, I found out what was going on.... This may or may not be a bug in inkscape, but my objects all have custom names, and some characters in the names are not actually valid URL characters. The only way to make this work is to create a new duplicate of A, delete A, create the clone from my new duplicate, apply the clip path on B to the clone, and then rename my duplicate of A back to its original name. – Mark Apr 20 '18 at 18:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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