public class

GestureStroke

extends Object
java.lang.Object
   ↳ android.gesture.GestureStroke

Class Overview

A gesture stroke started on a touch down and ended on a touch up.

Summary

Fields
public final RectF boundingBox
public final float length
public final float[] points
Public Constructors
GestureStroke(ArrayList<GesturePoint> points)
Construct a gesture stroke from a list of gesture points
Public Methods
void clearPath()
Invalidate the cached path that is used to render the stroke
OrientedBoundingBox computeOrientedBoundingBox()
Compute an oriented bounding box of the stroke
Path getPath()
Path toPath(float width, float height, int numSample)
Convert the stroke to a Path based on the number of points
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public final RectF boundingBox

Since: API Level 4

public final float length

Since: API Level 4

public final float[] points

Since: API Level 4

Public Constructors

public GestureStroke (ArrayList<GesturePoint> points)

Since: API Level 4

Construct a gesture stroke from a list of gesture points

Public Methods

public void clearPath ()

Since: API Level 4

Invalidate the cached path that is used to render the stroke

public OrientedBoundingBox computeOrientedBoundingBox ()

Since: API Level 4

Compute an oriented bounding box of the stroke

Returns
  • OrientedBoundingBox

public Path getPath ()

Since: API Level 4

public Path toPath (float width, float height, int numSample)

Since: API Level 4

Convert the stroke to a Path based on the number of points

Parameters
width the width of the bounding box of the target path
height the height of the bounding box of the target path
numSample the number of points needed
Returns
  • the path