soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
TypeEvaluator.h File Reference

Interface for use with the ValueAnimator::setEvaluator(TypeEvaluator) function. More...

#include <math.h>
#include <helper/obj-ref-impl.hpp>
#include <helper/SColor.h>

Go to the source code of this file.

Classes

class  TypeEvaluator< T >
 Template class for evaluating interpolated values between a start and end value. More...
 
class  TypeEvaluator< COLORREF >
 Specialized class for evaluating interpolated values between two COLORREF values. More...
 

Functions

template<typename T>
SNSBEGIN T Evaluate (float fraction, const T &start, const T &end)
 Template function for linearly interpolating values.
 
template<>
RECT Evaluate (float fraction, const RECT &mStart, const RECT &mEnd)
 Template specialization for linearly interpolating RECT values.
 
template<>
POINT Evaluate (float fraction, const POINT &mStart, const POINT &mEnd)
 Template specialization for linearly interpolating POINT values.
 
template<>
SIZE Evaluate (float fraction, const SIZE &mStart, const SIZE &mEnd)
 Template specialization for linearly interpolating SIZE values.
 

Detailed Description

Interface for use with the ValueAnimator::setEvaluator(TypeEvaluator) function.

Evaluators allow developers to create animations on arbitrary property types, by allowing them to supply custom evaluators for types that are not automatically understood and used by the animation system.

See also
ValueAnimator::setEvaluator(TypeEvaluator)

Definition in file TypeEvaluator.h.

Function Documentation

◆ Evaluate() [1/4]

template<>
POINT Evaluate ( float fraction,
const POINT & mStart,
const POINT & mEnd )
inline

Template specialization for linearly interpolating POINT values.

Parameters
fractionThe fraction from the starting to the ending values.
mStartThe starting POINT value.
mEndThe ending POINT value.
Returns
The linearly interpolated POINT value.

Definition at line 281 of file TypeEvaluator.h.

◆ Evaluate() [2/4]

template<>
RECT Evaluate ( float fraction,
const RECT & mStart,
const RECT & mEnd )
inline

Template specialization for linearly interpolating RECT values.

Parameters
fractionThe fraction from the starting to the ending values.
mStartThe starting RECT value.
mEndThe ending RECT value.
Returns
The linearly interpolated RECT value.

Definition at line 263 of file TypeEvaluator.h.

◆ Evaluate() [3/4]

template<>
SIZE Evaluate ( float fraction,
const SIZE & mStart,
const SIZE & mEnd )
inline

Template specialization for linearly interpolating SIZE values.

Parameters
fractionThe fraction from the starting to the ending values.
mStartThe starting SIZE value.
mEndThe ending SIZE value.
Returns
The linearly interpolated SIZE value.

Definition at line 297 of file TypeEvaluator.h.

◆ Evaluate() [4/4]

template<typename T>
SNSBEGIN T Evaluate ( float fraction,
const T & start,
const T & end )
inline

Template function for linearly interpolating values.

Template Parameters
TThe type of the values to interpolate.
Parameters
fractionThe fraction from the starting to the ending values.
startThe starting value.
endThe ending value.
Returns
The linearly interpolated value.

Definition at line 29 of file TypeEvaluator.h.