title: android mask bitmap
body: <p>I need to create a custom view amd in <code>onDraw</code> method I need to draw some bitmaps, using a mask. I created a paint:</p>
  
  <pre><code>    Paint maskPaint = new Paint();
      maskPaint.setAntiAlias(true);
      maskPaint.setXfermode(new AvoidXfermode(Color.RED, 0, AvoidXfermode.Mode.TARGET));
  </code></pre>
  
  <p>and I draw my bitmap on canvas using this paint. My problem is that at the corners, my mask have some pixels with alpha less than 255. Is there a way to draw my bitmap's pixels on the mask with the same alpha that mask image has on those pixels with aplha greater than zero?</p>