PorterduffXfermode: Clear a section of a bitmap
The goal is simply to draw a bitmap and over the top of it draw shapes that ERASE the underlying area of the bitmap. I have created simple proof of concept code to try and understand how exactly I should go about this. In the various threads here I have found numerous hints about using: android.graphics.PorterDuff.Mode.CLEAR The code below simply creates a screen with a blue background and adds a custom view. This view draws on its canvas a pink background, the bitmap image (with a slight border to show the pink background), and yellow overlaying circles representing each PorterDuffXfermode.