title: core graphics text clipping
body: <p>I have the following code working that draws a white rectangle and clips it the string "TEXT".</p>
  
  <p><img src="https://i.stack.imgur.com/XJ9oZ.png" alt="enter image description here"></p>
  
  <pre><code>CGContextSaveGState(c);
  CGContextTranslateCTM(c, 0.0f, rect.size.height);
  CGContextScaleCTM(c, 1.0f, -1.0f);
  CGContextSelectFont(c, "Helvetica-Bold", 16, kCGEncodingMacRoman);
  CGContextSetTextDrawingMode(c, kCGTextClip);
  CGContextShowTextAtPoint(c, x, y, "TEXT", strlen("TEXT"));
  CGContextClip(c);
  CGContextFillRect(c, fillRect);
  CGContextRestoreGState(c);
  </code></pre>
  
  <p>But I want it to clip so that it only draws outside of the text.  How do I do that?</p>