p>On the other hand, this one renders a red outline, the result of the red
paint being anti-aliased with the background at the clip edge, then the
white paint being similarly anti-aliased with the background <em>including
the clipped red paint</em>:</p>
<pre class="language-dart"><code class="language-dart">void paint(Canvas canvas, Size size) {
  // (this example renders poorly, prefer the example above)
  Rect rect = Offset.zero &amp; size;
  canvas.save();
  canvas.clipRRect(new RRect.fromRectXY(rect, 10