title: How do I antialias the clip boundary on Android's canvas?
body: <p>I'm using Android's <a href="http://developer.android.com/reference/android/graphics/Canvas.html" rel="noreferrer">android.graphics.Canvas</a> class <a href="http://code.google.com/p/publicobject/source/browse/shush/src/com/publicobject/shush/ClockSlider.java" rel="noreferrer">to draw a ring</a>. My onDraw method clips the canvas to make a hole for the inner circle, and then draws the full outer circle over the hole:</p>
  
  <pre><code>    clip = new Path();
      clip.addRect(outerCircle, Path.Direction.CW);
      clip.addOval(innerCircle, Path.Direction.CCW);
  
      canvas.save();
      canvas.clipPath(clip);
      canvas.drawOval(outerCircle, lightGrey);
      canvas.restore();
  </code></pre>
  
  <p>The result is a ring with a pretty, anti-aliased outer edge and a jagged, ugly inner edge:</p>
  
  <p><img src="https://3.bp.blogspot.com/_21QnE9BxmkU/S9PG2xO-pwI/AAAAAAAAB2g/YvdUt_2uOdA/s640/twoandahalfhours.png" alt="aliased"></p>
  
  <p>What can I do to antialias the inner edge?</p>
  
  <p>I don't want to cheat by drawing a grey circle in the middle because the dialog is slightly transparent. (This transparency isn't as subtle on on other backgrounds.)</p>