title: How to save Canvas to Bitmap according to Path
body: <p>I am working on an Image Cropper. User pass a bitmap and could use an oval to clip the bitmap.</p>
  
  <p>My Code:</p>
  
  <pre><code>public class CropView extends View{
  
      @Override
      protected void onDraw(Canvas canvas) {
             //Draw user's image to canvas
             canvas.drawBitmap(mBitmap, mMatrix, mPaint1);
  
             //Draw an oval shape.Contents inclued this shape should be clip and then save.
             //Please ignore method generateOvalPath(), it just generate a resizeable oval
             Path ovalPath = generateOvalPath();
             canvas.drawPath(ovalPath,mPaint2);
  
             **//How to save the contents included within the oval to a Bitmap?**
      }
  
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/uaGYR.png" alt="enter image description here"></p>