PathInterpolatorCompat
public
final
class
PathInterpolatorCompat
extends Object
Helper for creating path-based Interpolator
instances. On API 21 or newer, the
platform implementation will be used and on older platforms a compatible alternative
implementation will be used.
Summary
Inherited methods |
From
class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait(long millis, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long millis)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
|
Public methods
create
Interpolator create (Path path)
Create an Interpolator
for an arbitrary Path
. The Path
must begin at (0, 0)
and end at (1, 1)
. The x-coordinate along the
Path
is the input value and the output is the y coordinate of the line at that
point. This means that the Path must conform to a function y = f(x)
.
The
Path
must not have gaps in the x direction and must not
loop back on itself such that there can be two points sharing the same x coordinate.
Parameters |
path |
Path :
the Path to use to make the line representing the Interpolator |
create
Interpolator create (float controlX1,
float controlY1,
float controlX2,
float controlY2)
Create an Interpolator
for a cubic Bezier curve. The end points
(0, 0)
and (1, 1)
are assumed.
Parameters |
controlX1 |
float :
the x coordinate of the first control point of the cubic Bezier |
controlY1 |
float :
the y coordinate of the first control point of the cubic Bezier |
controlX2 |
float :
the x coordinate of the second control point of the cubic Bezier |
controlY2 |
float :
the y coordinate of the second control point of the cubic Bezier |
create
Interpolator create (float controlX,
float controlY)
Create an Interpolator
for a quadratic Bezier curve. The end points
(0, 0)
and (1, 1)
are assumed.
Parameters |
controlX |
float :
the x coordinate of the quadratic Bezier control point |
controlY |
float :
the y coordinate of the quadratic Bezier control point |