SkInterpolator Class Reference

#include <SkInterpolator.h>

Inherits SkInterpolatorBase.

Collaboration diagram for SkInterpolator:
[legend]

List of all members.

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]

Detailed Description

Definition at line 94 of file SkInterpolator.h.


Member Typedef Documentation

Definition at line 129 of file SkInterpolator.h.


Constructor & Destructor Documentation

SkInterpolator::SkInterpolator (  ) 
SkInterpolator::SkInterpolator ( int  elemCount,
int  frameCount 
)

Member Function Documentation

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.

Parameters:
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)
Result SkInterpolator::timeToValues ( SkMSec  time,
SkScalar  values[] = NULL 
) const

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

Parameters:
time The time to sample (in milliseconds)
(may be null) where to write the computed values.

Member Data Documentation

SkDEBUGCODE (static void UnitTest();) private SkScalar(* SkInterpolator::fScalarsArray)[10]

Definition at line 127 of file SkInterpolator.h.


The documentation for this class was generated from the following file:

Generated on Tue Oct 20 10:33:04 2009 for Skia by  doxygen 1.6.1