#include <SkInterpolator.h>
Inherits SkInterpolatorBase.
Public Types | |
typedef SkInterpolatorBase | INHERITED |
Public Member Functions | |
SkInterpolator () | |
SkInterpolator (int elemCount, int frameCount) | |
void | reset (int elemCount, int frameCount) |
bool | setKeyFrame (int index, SkMSec time, const SkScalar values[], const SkScalar blend[4]=NULL) |
Result | timeToValues (SkMSec time, SkScalar values[]=NULL) const |
Public Attributes | |
SkDEBUGCODE(static void UnitTest();) private SkScalar(* | fScalarsArray )[10] |
Definition at line 94 of file SkInterpolator.h.
Definition at line 129 of file SkInterpolator.h.
SkInterpolator::SkInterpolator | ( | ) |
SkInterpolator::SkInterpolator | ( | int | elemCount, | |
int | frameCount | |||
) |
void SkInterpolator::reset | ( | int | elemCount, | |
int | frameCount | |||
) |
Reimplemented from SkInterpolatorBase.
bool SkInterpolator::setKeyFrame | ( | int | index, | |
SkMSec | time, | |||
const SkScalar | values[], | |||
const SkScalar | blend[4] = NULL | |||
) |
Add or replace a key frame, copying the values[] data into the interpolator.
index | The index of this frame (frames must be ordered by time) | |
time | The millisecond time for this frame | |
values | The array of values [elemCount] for this frame. The data is copied into the interpolator. | |
blend | A positive scalar specifying how to blend between this and the next key frame. [0...1) is a cubic lag/log/lag blend (slow to change at the beginning and end) 1 is a linear blend (default) |
Return the computed values given the specified time. Return whether those values are the result of pinning to either the first (kFreezeStart) or last (kFreezeEnd), or from interpolated the two nearest key values (kNormal).
time | The time to sample (in milliseconds) | |
(may | be null) where to write the computed values. |
SkDEBUGCODE (static void UnitTest();) private SkScalar(* SkInterpolator::fScalarsArray)[10] |
Definition at line 127 of file SkInterpolator.h.