tml">saveLayer</a> for a
discussion of how to address that.</p>
<p>Use <a href="dart-ui/ClipOp-class.html">ClipOp.difference</a> to subtract the provided rectangle from the
current clip.</p>
    </section>
    
    <section class="summary source-code" id="source">
      <h2><span>Implementation</span></h2>
      <pre class="language-dart"><code class="language-dart">void clipRect(Rect rect, { ClipOp clipOp = ClipOp.intersect, bool doAntiAlias = true }) {
  assert(_rectIsValid(rect));
  assert(clipOp != null