SkInterpolatorBase Class Reference

#include <SkInterpolator.h>

Inherits SkNoncopyable.

Inherited by SkInterpolator.

Collaboration diagram for SkInterpolatorBase:
[legend]

List of all members.

Classes

struct  SkTimeCode

Public Types

enum  Result { kNormal_Result, kFreezeStart_Result, kFreezeEnd_Result }

Public Member Functions

void reset (int elemCount, int frameCount)
bool getDuration (SkMSec *startTime, SkMSec *endTime) const
void setMirror (bool mirror)
void setRepeatCount (SkScalar repeatCount)
void setReset (bool reset)
Result timeToT (SkMSec time, SkScalar *T, int *index, SkBool *exact) const

Protected Types

enum  Flags { kMirror = 1, kReset = 2, kHasBlend = 4 }

Protected Member Functions

 SkInterpolatorBase ()
 ~SkInterpolatorBase ()

Static Protected Member Functions

static SkScalar ComputeRelativeT (SkMSec time, SkMSec prevTime, SkMSec nextTime, const SkScalar blend[4]=NULL)

Protected Attributes

int16_t fFrameCount
uint8_t fElemCount
uint8_t fFlags
SkScalar fRepeat
SkTimeCodefTimes
void * fStorage
SkTimeCode(* fTimesArray )[10]

Detailed Description

Definition at line 22 of file SkInterpolator.h.


Member Enumeration Documentation

enum SkInterpolatorBase::Flags [protected]
Enumerator:
kMirror 
kReset 
kHasBlend 

Definition at line 72 of file SkInterpolator.h.

Enumerator:
kNormal_Result 
kFreezeStart_Result 
kFreezeEnd_Result 

Definition at line 24 of file SkInterpolator.h.


Constructor & Destructor Documentation

SkInterpolatorBase::SkInterpolatorBase (  )  [protected]
SkInterpolatorBase::~SkInterpolatorBase (  )  [protected]

Member Function Documentation

static SkScalar SkInterpolatorBase::ComputeRelativeT ( SkMSec  time,
SkMSec  prevTime,
SkMSec  nextTime,
const SkScalar  blend[4] = NULL 
) [static, protected]
bool SkInterpolatorBase::getDuration ( SkMSec startTime,
SkMSec endTime 
) const

Return the start and end time for this interpolator. If there are no key frames, return false.

Parameters:
startTime If not null, returns the time (in milliseconds) of the first keyframe. If there are no keyframes, this param is ignored (left unchanged).
endTime If not null, returns the time (in milliseconds) of the last keyframe. If there are no keyframes, this parameter is ignored (left unchanged).
Returns:
True if there are key frames, or false if there are none.
void SkInterpolatorBase::reset ( int  elemCount,
int  frameCount 
)

Reimplemented in SkInterpolator.

void SkInterpolatorBase::setMirror ( bool  mirror  )  [inline]

Set the whether the repeat is mirrored.

Parameters:
mirror If true, the odd repeats interpolate from the last key frame and the first.

Definition at line 52 of file SkInterpolator.h.

void SkInterpolatorBase::setRepeatCount ( SkScalar  repeatCount  )  [inline]

Set the repeat count. The repeat count may be fractional.

Parameters:
repeatCount Multiplies the total time by this scalar.

Definition at line 59 of file SkInterpolator.h.

void SkInterpolatorBase::setReset ( bool  reset  )  [inline]

Set the whether the repeat is mirrored.

Parameters:
reset If true, the odd repeats interpolate from the last key frame and the first.

Definition at line 65 of file SkInterpolator.h.

Result SkInterpolatorBase::timeToT ( SkMSec  time,
SkScalar T,
int *  index,
SkBool exact 
) const

Member Data Documentation

uint8_t SkInterpolatorBase::fElemCount [protected]

Definition at line 80 of file SkInterpolator.h.

uint8_t SkInterpolatorBase::fFlags [protected]

Definition at line 81 of file SkInterpolator.h.

int16_t SkInterpolatorBase::fFrameCount [protected]

Definition at line 79 of file SkInterpolator.h.

Definition at line 82 of file SkInterpolator.h.

void* SkInterpolatorBase::fStorage [protected]

Definition at line 88 of file SkInterpolator.h.

Definition at line 87 of file SkInterpolator.h.

Definition at line 90 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