title: Canvas children transparency
body: <p>Given a canvas with black background and some white children on it:</p>
  
  <p><a href="https://i.stack.imgur.com/izdcB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/izdcB.png" alt="enter image description here"></a></p>
  
  <p>How can I make all children transparent also through canvas background? Behind the canvas may be an image or other content. All solutions that I found are not satisfying:</p>
  
  <ul>
  <li>Render the canvas to PNG image and turn all white color to transparency. In this case I would loose all benefits of a vector graphic when using the canvas in a viewbox.</li>
  <li>Create one invers child of all children and render it in black on a transparent canvas. But I'm not shure if that's possible.</li>
  </ul>
  
  <p>Note: The children of the canvas may be changed so I'm not searching for a static solution (e.g. a fixed path around all children).</p>
  
  <p>Any ideas how to create such a mask?</p>