title: AvoidXferMode Tolerance
body: <p>I have a problem with the following code:</p>
  
  <pre><code>protected void onDraw(Canvas canvas)
  {
      Paint paint = new Paint();
  
      // Draw a blue circle
      paint.setColor(Color.BLUE);
      canvas.drawCircle(100, 100, 50, paint);
  
      // Draw a red circle where it collides with the blue one
      paint.setXfermode(new AvoidXfermode(Color.BLUE, 0, Mode.TARGET));
      paint.setColor(Color.RED);
      canvas.drawCircle(50, 50, 50, paint);
  }
  </code></pre>
  
  <p>According to the API documentation of AvoidXfermode the tolerance value 0 means that it looks for an EXACT color match. This should work here because I specify the same color as I used for drawing the first circle. But the result is that the red circle is not drawn at all. When I use a tolerance value of 255 instead then it works (red circle is drawn where it collides with the blue one) but that sounds wrong because with such a high tolerance I think it should draw the circle EVERYWHERE.</p>
  
  <p>So what's wrong here? API Documentation? Android? Me?</p>