simulated clip - clip nodes -hardcode clip

Post questions on how to use or achieve an effect in Inkscape.
tomaschwutz
Posts: 2
Joined: Sat Dec 13, 2008 6:34 am

simulated clip - clip nodes -hardcode clip

Postby tomaschwutz » Sat Dec 13, 2008 8:43 am

Hello,

What is the best way to delete/transform nodes and pathes so that they resemble a clip operation?

The background for this question is that I need to use emf graphics and the emf export currently (version 0.46 on windows XP) has problems with reproducing the clips in the emf-File. Therefore, I want to change the pathes (remove parts), so that the clip is not needed any more.

One arkward solution is to export the image to pdf and use ps2edit with the -sclip option (simulated clip) to change the paths so that they resemble the actual clip when re-exporting them to svg. (http://www.helga-glunz.homepage.t-onlin ... section_14)

How can I do this best direcly with Inkscape ?

Thanks for hints and tips.

Simarilius
Posts: 626
Joined: Wed Jun 06, 2007 2:37 am

Re: simulated clip - clip nodes -hardcode clip

Postby Simarilius » Sun Dec 14, 2008 12:44 am

you can use boolean ops to subtract the clip path from the object, (if theres more than one shape being clipped you need to duplicate the clip path and do it on each one.) you want path>subtract

tomaschwutz
Posts: 2
Joined: Sat Dec 13, 2008 6:34 am

Re: simulated clip - clip nodes -hardcode clip

Postby tomaschwutz » Sun Dec 14, 2008 6:42 am

Thanks Simarilius for your hint.

I experimented with the boolean operations before and continued with your hint. I got the best results with path->difference. Is this what you mean with subtract, or did I miss something? I got this far:

I draw a shape of all the canvas
I substract the clipping mask shape from that to get a canvas with a window inside it - I call it windowexterior.
I apply the difference operation of this windowexterior and the shape with the windowexterior on top.
I duplicate the the windowexterior before the difference if I want to apply it to several shapes.

This works fine with shapes, however, lines just disappear. The same with division operation.

I also experimented with cut path.
No matter if I apply the window or the exterior on top of a vertical line and apply the cut path operation, I always get the part near the starting point, but I often want to keep the other part near the end.

So, I am happy about further hints.

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

Re: simulated clip - clip nodes -hardcode clip

Postby kelan » Mon Dec 15, 2008 10:48 pm

The boolean operations don't work well on lines because lines don't have any geometric area. They seem like they do when rendered because of their stroke, but geometrically, they're just lines. I imagine the boolean operations could be tweaked to work with lines, but currently they don't (at least in 0.46, I haven't tried the dev builds).

As a work-around, you can perform Stroke to Path from the Path menu on a line, then use the boolean operations on it. However, it won't be a simple line anymore for editing purposes. It's not ideal.

Another idea is to place a new node on a line at the point you want to cut it, and then delete everything after that node. When using the Node tool :tool_node:, you can add a new node at a spot by double clicking that spot, or holding Ctrl+Alt and clicking the spot.


Return to “Help with using Inkscape”