"Punch" transparent hole in inkscape, without destructive boolean operations?


I have a black rectangle, and I want it to look like a stencil, with "cut-out" text in the centre.

In this image, I have converted both objects to paths and used the boolean difference tool:

(I'm not allowed to post images yet, so imagine a black rectangle with transparent text in the centre.)

This works, but it's destructive; I can't edit the text anymore.

To be completely clear, given a gradient, a rectangle in front of that, and text in front of that, I want to set the text to "transparent" and see not the rectangle, not the gradient, but transparency/nothingness.

I want the transparency to override any other colour behind it; I want the result I had above, but non-destructive; if I were to put another object below the rectangle there, I don't want to see that object, I want to see transparency.

4/9/2012 1:17:00 PM

Accepted Answer

You could mask it, though Inkscape has some issues with masks and some export formats. But even with a mask, I believe you'd have to convert the text to paths.

What I'd do is just always keep a copy of your text+rectangle.

Set your text on your rectangle, then clone them, and use the clone to do the 'punch'. If you ever need to tweak the text again, clone the original again, and re-do it.

4/9/2012 2:11:00 PM