create Filter Canvas from Bitmap - Android Graphics

Android examples for Graphics:Canvas

Description

create Filter Canvas from Bitmap

Demo Code


//package com.java2s;

import android.graphics.Bitmap;
import android.graphics.Canvas;

import android.graphics.PaintFlagsDrawFilter;

public class Main {
    public static Canvas createFilterCanvas(Bitmap bitmap) {
        Canvas canvas = new Canvas(bitmap);
        canvas.setDrawFilter(new PaintFlagsDrawFilter(0, 7));
        return canvas;
    }/*from w w  w.java2 s . com*/
}

Related Tutorials