[Solved] Apply several clipping paths to the same object?

Post questions on how to use or achieve an effect in Inkscape.
dervonnebenaan
Posts: 3
Joined: Mon Jan 27, 2014 9:01 am
Location: Germany

[Solved] Apply several clipping paths to the same object?

Postby dervonnebenaan » Mon Jan 27, 2014 10:08 am

Hello there!

All fresh and new to inkscapeforum. I've been working with Inkscape for a 1-2 years now and recently ran into an issue that I couldn't solve. Neither RTFM nor STFW or this forum provided any useful answers, so I hope you can help me.

I want to apply several clipping paths to a single object, but as soon as I set the second clip, the first one disappears. I created an svg to demonstrate it:

Image
the same as svg: http://sta.sh/029ycmsi5w2l
The only solution that I see is to unite the two clipping paths into a single object, but this is no option for me because the case where I need it is a little more complicated: I want to apply clip_path1 only to object A and clip_path2 to all Objects A,B and C.

I hope that I could make myself clear. And, of course, I hope that there's a solution to this.
See you.
dervonnebenaan

My system stats: Kubuntu 12.04 32-bit, Ponyscape 0.3 r12068 custom (a mod of Inkscape 0.48)
Last edited by dervonnebenaan on Sun Feb 02, 2014 11:13 am, edited 2 times in total.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Apply several clipping paths to the same object?

Postby Lazur » Fri Jan 31, 2014 12:10 am

Welcome aboard!

You can do that by grouping the object(s) to be clipped before each clipping,
or by using masking instead of clipping.

Good luck!

dervonnebenaan
Posts: 3
Joined: Mon Jan 27, 2014 9:01 am
Location: Germany

Re: Apply several clipping paths to the same object?

Postby dervonnebenaan » Sat Feb 01, 2014 7:52 am

Hey!

Thanks. I read about the necessity to group the objects before, but it doesn'nt make any difference. I tried this:
1. Create two objects and group them.
2. Create a third object on top and clip it.
3. Create a 4th object and clip it. -> as always, the first clip disappears.
I also tried to include the clipping path in the group, but that doesn't work either. Am I doing something terribly wrong or is my program bad? (I'm using Ponyscape, which is a little unstable and sometimes does weird things when moving objects between layers.)

Masking doesn't work either. It always interprets the objects stroke as mask instead of the fill.
Image
SVG:http://sta.sh/0212bkyoh9kt
Meanwhile, I've been provided with some ways around the issue on another forum, but I'm still interested in a proper solution.
See you.
dervonnebenaan

PS: Is there any way to post an image in resized form like [img_resize=]http:blabla[/img_resize] ?

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Apply several clipping paths to the same object?

Postby Lazur » Sat Feb 01, 2014 1:26 pm

Hi,

that is an intentional behaviour with the strokes.
Clipping doesn't use the strokes, masking do.
In your example masking the outline is not black of the mask object, so the green square should be visible there.
It can be done multiple times, with no problem.


With clipping you cannot set more clip object to one single object -thus you have to group the object, resulting in a "new, unclipped" object.

Like:
SVG Image

I belive there is no such option with this bbcode forum engine.

dervonnebenaan
Posts: 3
Joined: Mon Jan 27, 2014 9:01 am
Location: Germany

Re: Apply several clipping paths to the same object?

Postby dervonnebenaan » Sun Feb 02, 2014 11:12 am

Yes! Finally, I got it right.
Turns out, the only thing I didn't try out was to group the objects after applying the clip. -.- But now it works perfectly.

With the masking, I made the mistake that the fill of the masking object was not grey, but black with opacity. And if the mask is black, it will make the masked object 100% invisible, no matter how the opacity is set. The other way around, a non-black mask with 0% opacity will also make it completely invisible.

Thanks a lot for the help!
dervonnebenaan

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: [Solved] Apply several clipping paths to the same object

Postby Lazur » Sun Feb 02, 2014 11:27 am

Cheers!


Return to “Help with using Inkscape”