Use the following two methods as a start:
setXfermode(new PorterDuffXfermode(Mode.DARKEN));
canvas.clipPath(path, Region.Op.DIFFERENCE);
The first one is applied to a Paint object and darkens a certain region.
The second "clips" the path in your canvas and takes the inverse (using Region.Op.DIFFERENCE).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…