0

I would like to create a filled rectangle with transparent text in it. So you can see through the letters what's painted under the shape. There is a Text Shape in javafx. But it allows to access only the area within the letters: filling, stroke, color, etc. It is not possible to fill its rectangular borders leaving text unfilled. There is a rectangular Shape. But I didn't manage to find out how to "cut off" text from it. Maybe there is any way to mix those two? To create an Object with both inner-text and outer-text areas accessible for filling with color? I will appreciate any help.

pseusys
  • 407
  • 2
  • 5
  • 17
  • Have a look on this [answer](https://stackoverflow.com/a/26230057/4629012) and especially on the method `Shape.subtract(pShape1, pShape2)`. – Pagbo Apr 11 '18 at 14:42
  • @Pagbo, thanks a lot! I was searching this solution for a few months! – pseusys Nov 01 '18 at 22:21

0 Answers0