+ if( mLoopCount > 0 ) // If not a ininity loop, then calculate remained loop
+ {
+ remainedLoop = mLoopCount - ( mScrollAnimation.GetCurrentLoop() );
+ remainedLoop = ( remainedLoop <= 0 ? 1 : remainedLoop );
+ }
+ }
+ mScrollAnimation.Clear();
+
+ // Reset to the original shader and texture before scrolling
+ mRenderer.SetShader(mShader);
+ if( mTextureSet )
+ {
+ mRenderer.SetTextures( mTextureSet );
+ }
+ }
+
+ mShader = mRenderer.GetShader();
+ mTextureSet = mRenderer.GetTextures();
+
+ // Set the shader and texture for scrolling
+ Shader shader = Shader::New( VERTEX_SHADER_SCROLL, FRAGMENT_SHADER, Shader::Hint::NONE );
+ mRenderer.SetShader( shader );
+ mRenderer.SetTextures( textureSet );
+
+ DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextScroller::SetParameters wrapGap[%f]\n", wrapGap );
+
+ float horizontalAlign;
+
+ if( textureSize.x > controlSize.x )