Merge "Alignment - Fix a pixel alignment issue with the center alignment." into new_text
authorPaul Wisbey <p.wisbey@samsung.com>
Thu, 19 Mar 2015 11:04:03 +0000 (04:04 -0700)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Thu, 19 Mar 2015 11:04:03 +0000 (04:04 -0700)
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: