Paint paint = new Paint(); paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));
Paint paint = new Paint(); paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_OVER));Package Library: The setXfermode method is part of the android.graphics.Paint class, which is included in the android.graphics package library.