Home | History | Annotate | Download | only in gesture

Lines Matching defs:Gesture

17 package android.gesture;
37 * A gesture is a hand-drawn shape on a touch screen. It can have one or multiple strokes.
38 * Each stroke is a sequence of timed points. A user-defined gesture can be recognized by
42 public class Gesture implements Parcelable {
59 public Gesture() {
65 Gesture gesture = new Gesture();
66 gesture.mBoundingBox.set(mBoundingBox.left, mBoundingBox.top,
71 gesture.mStrokes.add((GestureStroke)stroke.clone());
73 return gesture;
77 * @return all the strokes of the gesture
84 * @return the number of strokes included by this gesture
91 * Adds a stroke to the gesture.
101 * Calculates the total length of the gesture. When there are multiple strokes in
102 * the gesture, this returns the sum of the lengths of all the strokes.
104 * @return the length of the gesture
119 * @return the bounding box of the gesture
160 * Sets the id of the gesture.
169 * @return the id of the gesture
176 * Creates a bitmap of the gesture with a transparent background.
212 * Creates a bitmap of the gesture with a transparent background.
258 // Write gesture ID
268 static Gesture deserialize(DataInputStream in) throws IOException {
269 final Gesture gesture = new Gesture();
271 // Gesture ID
272 gesture.mGestureID = in.readLong();
277 gesture.addStroke(GestureStroke.deserialize(in));
280 return gesture;
283 public static final Parcelable.Creator<Gesture> CREATOR = new Parcelable.Creator<Gesture>() {
284 public Gesture createFromParcel(Parcel in) {
285 Gesture gesture = null;
292 gesture = deserialize(inStream);
294 Log.e(GestureConstants.LOG_TAG, "Error reading Gesture from parcel:", e);
299 if (gesture != null) {
300 gesture.mGestureID = gestureID;
303 return gesture;
306 public Gesture[] newArray(int size) {
307 return new Gesture[size];
323 Log.e(GestureConstants.LOG_TAG, "Error writing Gesture to parcel:", e);