+ switch ( mAlignment & HORIZONTAL_ALIGNMENT_MASK )
+ {
+ case Dali::Toolkit::LinearLayout::Alignment::BEGIN:
+ default:
+ {
+ // mTotalLength contains the padding already
+ // In case of RTL map BEGIN alignment to the right edge
+ if ( isLayoutRtl ) {
+ childLeft = LayoutLength( padding.start ) + right - left - mTotalLength;
+ }
+ else {
+ childLeft = LayoutLength( padding.start );
+ }
+ break;
+ }
+ case Dali::Toolkit::LinearLayout::Alignment::END:
+ {
+ // mTotalLength contains the padding already
+ // In case of RTL map END alignment to the left edge
+ if ( isLayoutRtl ) {
+ childLeft = LayoutLength( padding.start );
+ }
+ else {
+ childLeft = LayoutLength( padding.start ) + right - left - mTotalLength;
+ }
+ break;
+ }
+ case Dali::Toolkit::LinearLayout::Alignment::CENTER_HORIZONTAL:
+ {
+ // mTotalLength contains the padding already
+ childLeft = LayoutLength( padding.start ) + ( right - left - mTotalLength ) / 2;
+ break;
+ }
+ }
+