public class TransformedMotionEvent
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
TransformedMotionEvent.TransformDiff |
Modifier and Type | Method and Description |
---|---|
static float |
distance(float[] pos1,
float[] pos2) |
int |
getActionMasked()
Return the kind of action being performed.
|
int |
getPointerCount()
The number of pointers of data contained in this event.
|
float[] |
getPosition(int index)
Get the transformed pos of the point.
|
float[] |
getPosition(int index,
float[] dest)
Get the transformed pos of the point.
|
android.view.MotionEvent |
getRawEvent() |
TransformedMotionEvent |
getScreenEvent() |
TransformedMotionEvent.TransformDiff |
getTransformDifference()
Return the differences to the checkpoint.
|
boolean |
hasClicked()
Check if the event is a click.
|
boolean |
hasDoubleTapped() |
boolean |
hasFixedCenterPoint()
Return if the event has a fixed center point to emulate a multitouch rotating and scaling Event.
|
boolean |
isCheckpoint()
If this return true you must saveImage your current state.
|
boolean |
isRelease() |
static TransformedMotionEvent |
obtain(android.view.MotionEvent event) |
static TransformedMotionEvent |
obtain(android.view.MotionEvent event,
android.graphics.Matrix matrix) |
void |
recycle() |
void |
setFixedCenterPoint(float[] pos)
Set a center point to emulate a multitouch rotating and scaling Event
|
void |
setFixedCenterPoint(float x,
float y)
Set a center point to emulate a multitouch rotating and scaling Event
|
public static float distance(float[] pos1, float[] pos2)
public int getActionMasked()
getActionMasked()
and MotionEvent.getActionIndex()
to retrieve
the separate masked action and pointer index.MotionEvent.ACTION_DOWN
or
the combination of MotionEvent.ACTION_POINTER_DOWN
with a shifted pointer index.public int getPointerCount()
public float[] getPosition(int index)
index
- point index @see #getPointerCountpublic float[] getPosition(int index, float[] dest)
index
- point index @see #getPointerCountpublic android.view.MotionEvent getRawEvent()
public TransformedMotionEvent getScreenEvent()
@NonNull public TransformedMotionEvent.TransformDiff getTransformDifference()
public boolean hasClicked()
public boolean hasDoubleTapped()
public boolean hasFixedCenterPoint()
public boolean isCheckpoint()
getTransformDifference()
public boolean isRelease()
public static TransformedMotionEvent obtain(android.view.MotionEvent event)
public static TransformedMotionEvent obtain(android.view.MotionEvent event, android.graphics.Matrix matrix)
public void recycle()
public void setFixedCenterPoint(float[] pos)
pos
- center point array {x, y}.public void setFixedCenterPoint(float x, float y)
x
- center point x.y
- center point y.