Java tutorial
//package com.java2s; //License from project: Apache License import android.graphics.Paint; import android.graphics.PorterDuff; import android.graphics.PorterDuffXfermode; public class Main { /** * * @return */ public static Paint newPaint() { Paint paint = new Paint(1); paint.setFilterBitmap(true); paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_IN)); return paint; } }