parent to draw. This is the DST. super.draw(canvas); ! // Create an off-screen bitmap. Bitmap mask = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); // Draw the path on the bitmap. This is the SRC. (new Canvas(mask)).drawPath(mPath, mPaint); // Draw the bitmap containing the path, over the actual canvas. mPaint.setXfermode(new PorterDuffXfermode(Mode.DST_IN)); canvas.drawBitmap(mask, 0, 0, mPaint); // Reset paint, as it will be used again to draw a path on a bitmap. mPaint.setXfermode(null); ! canvas.restore(); }