Merge "Fix for text handle positioning." into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / text-scroller.cpp
index 5b7b99b..3c9b450 100644 (file)
@@ -194,15 +194,15 @@ TextScrollerPtr TextScroller::New( ScrollerInterface& scrollerInterface )
   return textScroller;
 }
 
-void TextScroller::SetGap( float gap )
+void TextScroller::SetGap( int gap )
 {
-  DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextScroller::SetGap gap[%f]\n", gap );
-  mWrapGap = gap;
+  DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextScroller::SetGap gap[%d]\n", gap );
+  mWrapGap = static_cast<float>(gap);
 }
 
-float TextScroller::GetGap() const
+int TextScroller::GetGap() const
 {
-  return mWrapGap;
+  return static_cast<int>(mWrapGap);
 }
 
 void TextScroller::SetSpeed( int scrollSpeed )
@@ -262,10 +262,10 @@ TextScroller::~TextScroller()
   CleanUp();
 }
 
-void TextScroller::SetParameters( Actor sourceActor, const Size& controlSize, const Size& offScreenSize, CharacterDirection direction, const Vector2 alignmentOffset )
+void TextScroller::SetParameters( Actor sourceActor, const Size& controlSize, const Size& offScreenSize, CharacterDirection direction, float alignmentOffset )
 {
-  DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextScroller::SetParameters controlSize[%f,%f] offscreenSize[%f,%f] direction[%d] alignmentOffset[%f,%f]\n",
-                 controlSize.x, controlSize.y, offScreenSize.x, offScreenSize.y, direction, alignmentOffset.x, alignmentOffset.y );
+  DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextScroller::SetParameters controlSize[%f,%f] offscreenSize[%f,%f] direction[%d] alignmentOffset[%f]\n",
+                 controlSize.x, controlSize.y, offScreenSize.x, offScreenSize.y, direction, alignmentOffset );
 
   FrameBufferImage offscreenRenderTargetForText = FrameBufferImage::New( offScreenSize.width, offScreenSize.height, Pixel::RGBA8888, Dali::Image::UNUSED );
   Renderer renderer;
@@ -277,7 +277,7 @@ void TextScroller::SetParameters( Actor sourceActor, const Size& controlSize, co
   // Reposition camera to match alignment of target, RTL text has direction=true
   if ( direction )
   {
-    mOffscreenCameraActor.SetX( alignmentOffset.x + offScreenSize.width*0.5f );
+    mOffscreenCameraActor.SetX( alignmentOffset + offScreenSize.width*0.5f );
   }
   else
   {