Android MotionEvent Transform transformEvent(MotionEvent e, Matrix m)

Here you can find the source of transformEvent(MotionEvent e, Matrix m)

Description

transform Event

Declaration

public static MotionEvent transformEvent(MotionEvent e, Matrix m) 

Method Source Code

//package com.java2s;
import android.graphics.Matrix;
import android.view.MotionEvent;

public class Main {
    public static MotionEvent transformEvent(MotionEvent e, Matrix m) {
        // We try to use the new transform method if possible because it uses
        // less memory.
        return transformEventNew(e, m);
    }/*from   ww w.  j a v  a2 s .  c  o  m*/

    private static MotionEvent transformEventNew(MotionEvent e, Matrix m) {
        MotionEvent newEvent = MotionEvent.obtain(e);
        newEvent.transform(m);
        return newEvent;
    }
}

Related

  1. transformEvent(final MotionEvent e, final Matrix m)
  2. transformEventNew(MotionEvent e, Matrix m)