| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package android.gesture; |
| 18 |
|
| 19 |
import java.io.DataInputStream; |
| 20 |
import java.io.IOException; |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
public class GesturePoint { |
| 27 |
public final float x; |
| 28 |
public final float y; |
| 29 |
|
| 30 |
public final long timestamp; |
| 31 |
|
| 32 |
public GesturePoint(float x, float y, long t) { |
| 33 |
this.x = x; |
| 34 |
this.y = y; |
| 35 |
timestamp = t; |
| 36 |
} |
| 37 |
|
| 38 |
static GesturePoint deserialize(DataInputStream in) throws IOException { |
| 39 |
|
| 40 |
final float x = in.readFloat(); |
| 41 |
final float y = in.readFloat(); |
| 42 |
|
| 43 |
final long timeStamp = in.readLong(); |
| 44 |
return new GesturePoint(x, y, timeStamp); |
| 45 |
} |
| 46 |
|
| 47 |
@Override |
| 48 |
public Object clone() { |
| 49 |
return new GesturePoint(x, y, timestamp); |
| 50 |
} |
| 51 |
} |