Alignment - Fix a pixel alignment issue with the center alignment. 13/37113/1
authorVictor Cebollada <v.cebollada@samsung.com>
Thu, 19 Mar 2015 10:53:35 +0000 (10:53 +0000)
committerVictor Cebollada <v.cebollada@samsung.com>
Thu, 19 Mar 2015 10:53:35 +0000 (10:53 +0000)
Change-Id: Ib934bffb8237fb2bef8d5110b535fc950e787529
Signed-off-by: Victor Cebollada <v.cebollada@samsung.com>
dali-toolkit/internal/text/layouts/layout-engine.cpp

index 1eed911..460fb02 100644 (file)
@@ -588,6 +588,8 @@ struct LayoutEngine::Impl
       case ALIGN_CENTER:
       {
         offset = 0.5f * ( boxWidth - lineLength );
+        const int intOffset = static_cast<int>( offset ); // try to avoid pixel alignment.
+        offset = static_cast<float>( intOffset );
         break;
       }
       case ALIGN_END: