Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.graphics.Bitmap;

import android.graphics.Matrix;

public class Main {
    public static Bitmap GetMirror(Bitmap bm) {
        if (bm == null)
            return null;

        float[] mirrorM = { -1, 0, 0, 0, 1, 0, 0, 0, 1 };

        Matrix m = new Matrix();
        m.setValues(mirrorM);
        return Bitmap.createBitmap(bm, 0, 0, bm.getWidth(), bm.getHeight(), m, false);
    }
}