Android
android.graphics
public class

android.graphics.Interpolator

java.lang.Object
android.graphics.Interpolator

Summary

Public Constructors

            Interpolator(int valueCount)
            Interpolator(int valueCount, int frameCount)

Public Methods

    final      int  getKeyFrameCount()
    final      int  getValueCount()
          void  reset(int valueCount, int frameCount)
Reset the Interpolator to have the specified number of values and keyFrames.
          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  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).

Protected Methods

          void  finalize()
Called by the virtual machine when there are no longer any (non-weak) references to the receiver.
Methods inherited from class java.lang.Object

Details

Public Constructors

public Interpolator(int valueCount)

public Interpolator(int valueCount, int frameCount)

Public Methods

public final int getKeyFrameCount()

public final int getValueCount()

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().

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().

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

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

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.

public Interpolator.Result timeToValues(float[] values)

Calls timeToValues(msec, values) with the msec set to now (by calling (int)SystemClock.uptimeMillis().)

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)

Protected Methods

protected void finalize()

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.

Throws

Throwable
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:56