-// @todo think about alternative ways of passing around
-struct AlphaFuncStruct
-{
- const char* const name;
- AlphaFunction alphaFunc;
-};
-/**
- * Contains a list of alpha functions that can be used.
- */
-const AlphaFuncStruct AlphaFunctionTable[]=
-{
-
- {"default" , AlphaFunction::DEFAULT },
- {"linear" , AlphaFunction::LINEAR },
- {"reverse" , AlphaFunction::REVERSE },
-
- {"easeInSquare" , AlphaFunction::EASE_IN_SQUARE },
- {"easeOutSquare" , AlphaFunction::EASE_OUT_SQUARE },
-
- {"easeIn" , AlphaFunction::EASE_IN },
- {"easeOut" , AlphaFunction::EASE_OUT },
- {"easeInOut" , AlphaFunction::EASE_IN_OUT },
-
- {"easeInSine" , AlphaFunction::EASE_IN_SINE },
- {"easeOutSine" , AlphaFunction::EASE_OUT_SINE },
- {"easeInOutSine" , AlphaFunction::EASE_IN_OUT_SINE },
-
- {"bounce" , AlphaFunction::BOUNCE },
- {"sin" , AlphaFunction::SIN },
- {"easeOutBack" , AlphaFunction::EASE_OUT_BACK },
-
-};
-const unsigned int AlphaFunctionTableCount = sizeof(AlphaFunctionTable)/sizeof(AlphaFunctionTable[0]);
-const char* const DEFAULT_ALPHA_NAME = "default";
-static AlphaFunction DEFAULT_ALPHA_FUNCTION = AlphaFunction::DEFAULT;
-
-
-
-AlphaFunction GetAlphaFunction( const std::string& alphaFuncName )
-{
- // This will normally get called just a few times during the application, so no point in doing anything clever
- for( unsigned int i = 0; i < AlphaFunctionTableCount; i++)
- {
- const AlphaFuncStruct& alphaStruct( AlphaFunctionTable[i] );
-
- if( std::strcmp( alphaStruct.name , alphaFuncName.c_str() ) == 0 )
- {
- return alphaStruct.alphaFunc;
- }
- }
-
- DALI_LOG_ERROR("Failed to find alpha func |%s| \n", alphaFuncName.c_str() );
- return DEFAULT_ALPHA_FUNCTION;
-}
-
-const char* const GetAlphaFunctionName( AlphaFunction alphaFunc )
-{
- // This may get called 3 times during the application, so no point
- // in doing anything clever
-
- for( unsigned int i = 0; i < AlphaFunctionTableCount; i++)
- {
- const AlphaFuncStruct& alphaStruct( AlphaFunctionTable[i] );
-
-
- if( alphaStruct.alphaFunc.GetBuiltinFunction() == alphaFunc.GetBuiltinFunction() )
- {
- return alphaStruct.name;
- }
- }
- return "default";
-}
-
-