Build 1.0_r1(from source)

android.graphics
Class Interpolator

java.lang.Object
  extended by android.graphics.Interpolator

public class Interpolator
extends Object


Nested Class Summary
static class Interpolator.Result
           
 
Constructor Summary
Interpolator(int valueCount)
           
Interpolator(int valueCount, int frameCount)
           
 
Method Summary
protected  void finalize()
          Called by the virtual machine when there are no longer any (non-weak) references to the receiver.
 int getKeyFrameCount()
           
 int getValueCount()
           
 void reset(int valueCount)
          Reset the Interpolator to have the specified number of values and an implicit keyFrame count of 2 (just a start and end).
 void reset(int valueCount, int frameCount)
          Reset the Interpolator to have the specified number of values and keyFrames.
 void setKeyFrame(int index, int msec, float[] values)
          Assign the keyFrame (specified by index) a time value and an array of key values (with an implicity blend array of [0, 0, 1, 1] giving linear transition to the next set of key values).
 void setKeyFrame(int index, int msec, float[] values, float[] blend)
          Assign the keyFrame (specified by index) a time value and an array of key values and blend array.
 void setRepeatMirror(float repeatCount, boolean mirror)
          Set a repeat count (which may be fractional) for the interpolator, and whether the interpolator should mirror its repeats.
 Interpolator.Result timeToValues(float[] values)
          Calls timeToValues(msec, values) with the msec set to now (by calling (int)SystemClock.uptimeMillis().)
 Interpolator.Result timeToValues(int msec, float[] values)
          Given a millisecond time value (msec), return the interpolated values and return whether the specified time was within the range of key times (NORMAL), was before the first key time (FREEZE_START) or after the last key time (FREEZE_END).
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Interpolator

public Interpolator(int valueCount)

Interpolator

public Interpolator(int valueCount,
                    int frameCount)
Method Detail

reset

public void reset(int valueCount)
Reset the Interpolator to have the specified number of values and an implicit keyFrame count of 2 (just a start and end). After this call the values for each keyFrame must be assigned using setKeyFrame().


reset

public void reset(int valueCount,
                  int frameCount)
Reset the Interpolator to have the specified number of values and keyFrames. After this call the values for each keyFrame must be assigned using setKeyFrame().


getKeyFrameCount

public final int getKeyFrameCount()

getValueCount

public final int getValueCount()

setKeyFrame

public void setKeyFrame(int index,
                        int msec,
                        float[] values)
Assign the keyFrame (specified by index) a time value and an array of key values (with an implicity blend array of [0, 0, 1, 1] giving linear transition to the next set of key values).

Parameters:
index - The index of the key frame to assign
msec - The time (in mililiseconds) for this key frame. Based on the SystemClock.uptimeMillis() clock
values - Array of values associated with theis key frame

setKeyFrame

public void setKeyFrame(int index,
                        int msec,
                        float[] values,
                        float[] blend)
Assign the keyFrame (specified by index) a time value and an array of key values and blend array.

Parameters:
index - The index of the key frame to assign
msec - The time (in mililiseconds) for this key frame. Based on the SystemClock.uptimeMillis() clock
values - Array of values associated with theis key frame
blend - (may be null) Optional array of 4 blend values

setRepeatMirror

public void setRepeatMirror(float repeatCount,
                            boolean mirror)
Set a repeat count (which may be fractional) for the interpolator, and whether the interpolator should mirror its repeats. The default settings are repeatCount = 1, and mirror = false.


timeToValues

public Interpolator.Result timeToValues(float[] values)
Calls timeToValues(msec, values) with the msec set to now (by calling (int)SystemClock.uptimeMillis().)


timeToValues

public Interpolator.Result timeToValues(int msec,
                                        float[] values)
Given a millisecond time value (msec), return the interpolated values and return whether the specified time was within the range of key times (NORMAL), was before the first key time (FREEZE_START) or after the last key time (FREEZE_END). In any event, computed values are always returned.

Parameters:
msec - The time (in milliseconds) used to sample into the Interpolator. Based on the SystemClock.uptimeMillis() clock
values - Where to write the computed values (may be NULL).
Returns:
how the values were computed (even if values == null)

finalize

protected void finalize()
                 throws Throwable
Description copied from class: Object
Called by the virtual machine when there are no longer any (non-weak) references to the receiver. Subclasses can use this facility to guarantee that any associated resources are cleaned up before the receiver is garbage collected. Uncaught exceptions which are thrown during the running of the method cause it to terminate immediately, but are otherwise ignored.

Note: The virtual machine assumes that the implementation in class Object is empty.

Overrides:
finalize in class Object
Throws:
Throwable - The virtual machine ignores any exceptions which are thrown during finalization.

Build 1.0_r1(from source)

Please submit a feedback, bug or feature