Merge "Add test case for ControlImpl::OnAccessibilityActivated" into tizen
[platform/core/uifw/dali-toolkit.git] / docs / content / programming-guide / animation-shader.h
1 /*! \page animation-shader Shader Effect Animation
2  *
3
4 The uniforms of a shader can be animated using the Animation::AnimateTo functions.
5
6 For example, to animate the center point of the Bendy shader effect:
7 @code
8 Dali::Animation animation = Dali::Animation::New( 1.0f );
9 //...
10 Vector2 newPosition( 0.0f, 0.0f );
11 animation.AnimateTo( Property(shaderEffect, shaderEffect.GetPositionPropertyName()), newPosition );
12 @endcode
13
14 To animate a uniform of a custom shader effect, the developer must use the name of the uniform:
15 @code
16 Dali::Animation animation = Dali::Animation::New( 1.0f );
17 //...
18 // Set the initial value for the uniform
19 shaderEffect.SetUniform( "myUniform", -0.5f );
20 //...
21 // Animate the uniform to a value
22 animation.AnimateTo( Property(shaderEffect, "myUniform"), 0.5f );
23 @endcode
24
25  *
26  */