Length numberOfCharacters,
Text::HorizontalAlignment::Type horizontalAlignment,
Vector<LineRun>& lines,
- float& alignmentOffset,
- Dali::LayoutDirection::Type layoutDirection,
- bool matchSystemLanguageDirection )
+ float& alignmentOffset )
{
const CharacterIndex lastCharacterPlusOne = startIndex + numberOfCharacters;
// the box width, line length, and the paragraph's direction.
CalculateHorizontalAlignment( size.width,
horizontalAlignment,
- line,
- layoutDirection,
- matchSystemLanguageDirection );
+ line );
// Updates the alignment offset.
alignmentOffset = std::min( alignmentOffset, line.alignmentOffset );
void CalculateHorizontalAlignment( float boxWidth,
HorizontalAlignment::Type horizontalAlignment,
- LineRun& line,
- Dali::LayoutDirection::Type layoutDirection,
- bool matchSystemLanguageDirection )
+ LineRun& line )
{
line.alignmentOffset = 0.f;
- bool isRTL = RTL == line.direction;
+ const bool isRTL = RTL == line.direction;
float lineLength = line.width;
- HorizontalAlignment::Type alignment = horizontalAlignment;
-
- // match align for system language direction
- if( matchSystemLanguageDirection )
- {
- isRTL = layoutDirection == LayoutDirection::RIGHT_TO_LEFT;
- }
- // Swap the alignment type if the line is right to left.
+ HorizontalAlignment::Type alignment = horizontalAlignment;
if( isRTL )
{
+ // Swap the alignment type if the line is right to left.
switch( alignment )
{
case HorizontalAlignment::BEGIN:
break;
}
}
-
}
// Calculate the horizontal line offset.
Length numberOfCharacters,
Text::HorizontalAlignment::Type horizontalAlignment,
Vector<LineRun>& lines,
- float& alignmentOffset,
- Dali::LayoutDirection::Type layoutDirection,
- bool matchSystemLanguageDirection )
+ float& alignmentOffset )
{
mImpl->Align( size,
startIndex,
numberOfCharacters,
horizontalAlignment,
lines,
- alignmentOffset,
- layoutDirection,
- matchSystemLanguageDirection );
+ alignmentOffset );
}
void Engine::SetDefaultLineSpacing( float lineSpacing )