bug fixed : Characters are truncated when HorizontalAlignment.End in 86/192086/9
authorJoogab Yun <joogab.yun@samsung.com>
Tue, 30 Oct 2018 05:18:14 +0000 (14:18 +0900)
committerJoogab Yun <joogab.yun@samsung.com>
Tue, 6 Nov 2018 04:22:02 +0000 (13:22 +0900)
commit68c69395e8cc9c980ce3e478cb224ac38286581e
tree79a9e3c6b0a60b80bd5107e49d8e37004f143ceb
parent8d03e750dd430e081ec17d298b593612ab45e841
bug fixed : Characters are truncated when HorizontalAlignment.End in
Multi line text on RTL environment.

Recalculate the alignmentOffset only if the line is RTL.

We need to distinguish the RTL variable for alignment and the RTL variable for the text line for position offset.
So the RTL check of the text line is called isLineRTL.

ex)
When running the sample app below, the characters are truncated.

 Stage stage = Stage::GetCurrent();
 stage.SetBackgroundColor( Color::WHITE );

 TextLabel label = TextLabel::New( "Music, Film & TV, Funny, News,
Sports... Access millions of user generaed content and professional
videos from DAILYMOTION website on your SAMSUNG TV.Search, browse and
watch, get a direct access to your own or favorite accounts, watch a
selection of best" );
 label.SetSize( 1250, 600 );
 label.SetParentOrigin(ParentOrigin::TOP_LEFT);
 label.SetAnchorPoint(AnchorPoint::TOP_LEFT);
 label.SetPosition( 100.f, 700.f);
 label.SetProperty( TextLabel::Property::MULTI_LINE, true );
 label.SetProperty(TextLabel::Property::POINT_SIZE, 30);
 label.SetProperty(TextLabel::Property::HORIZONTAL_ALIGNMENT,
"END");
 label.SetProperty(Toolkit::DevelTextLabel::Property::MATCH_SYSTEM_LANGUAGE_DIRECTION,
true );
 label.SetProperty( Actor::Property::LAYOUT_DIRECTION,
LayoutDirection::RIGHT_TO_LEFT );

 stage.Add( label );

Change-Id: I0c1161330de073cef466d8e7119a56a9be606034
automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Layout.cpp
dali-toolkit/internal/text/layouts/layout-engine.cpp