public class ScaledMotionEventWrapper
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ScaledMotionEventWrapper.TransformDiff |
| Constructor and Description |
|---|
ScaledMotionEventWrapper(android.view.MotionEvent event,
float scale,
float offsetX,
float offsetY) |
| Modifier and Type | Method and Description |
|---|---|
int |
getActionMasked()
Return the kind of action being performed.
|
int |
getPointerCount()
The number of pointers of data contained in this event.
|
ScaledMotionEventWrapper.TransformDiff |
getTransformDifference()
Return the differences to the checkpoint.
|
float |
getX(int index)
Get the scaled x pos of the point.
|
float |
getY(int index)
Get the scaled y pos of the point.
|
boolean |
hasClicked()
Check if the event is a click.
|
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 save your current state.
|
void |
setFixedCenterPoint(float x,
float y)
Set a center point to emulate a multitouch rotating and scaling Event
|
public ScaledMotionEventWrapper(android.view.MotionEvent event,
float scale,
float offsetX,
float offsetY)
public void setFixedCenterPoint(float x,
float y)
x - center point x.y - center point y.public boolean hasFixedCenterPoint()
public boolean hasClicked()
public boolean isCheckpoint()
getTransformDifference()public float getX(int index)
index - point index @see #getPointerCountpublic float getY(int index)
index - point index @see #getPointerCountpublic int getPointerCount()
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.@NonNull public ScaledMotionEventWrapper.TransformDiff getTransformDifference()