5

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.

2
  • When you add "if I were to put another object below the rectangle there, I don't want to see that object, I want to see transparency" - this seems to imply "live" boolean operations on groups of objects, or on all objects in a layer?
    – e100
    Apr 10, 2012 at 15:37
  • If you put something below everything and don't see it, you don't have a transparent hole or text, but a white one (or whatever your drawing background is). You never can see transparency. But I don't know a solution where you can later simply edit your text (for example for a translation into another language). Aug 9, 2015 at 2:52

1 Answer 1

3

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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