Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import android.graphics.Matrix;

public class Main {
    /**
     * Calculates the transformation matrix according to M(transformation) * M(source) = M(target).
     *
     * @param source source matrix
     * @param target target matrix
     * @return delta matrix
     */
    public static Matrix getTransformationMatrix(Matrix source, Matrix target) {
        Matrix delta = new Matrix();
        source.invert(delta);
        delta.postConcat(target);
        return delta;
    }
}