LineLayout tmpLineLayout;
const bool isMultiline = mLayout == MULTI_LINE_BOX;
+ const bool isWordLaidOut = parameters.lineWrapMode == Layout::LineWrap::WORD;
// The last glyph to be laid-out.
const GlyphIndex lastGlyphOfParagraphPlusOne = parameters.startGlyphIndex + parameters.numberOfGlyphs;
if( isMultiline &&
( TextAbstraction::WORD_BREAK == wordBreakInfo ) )
{
- oneWordLaidOut = true;
+ oneWordLaidOut = isWordLaidOut;
DALI_LOG_INFO( gLogFilter, Debug::Verbose, " One word laid-out\n" );
// Current glyph is the last one of the current word.
CharacterIndex startIndex,
Length numberOfCharacters,
HorizontalAlignment horizontalAlignment,
- Vector<LineRun>& lines )
+ Vector<LineRun>& lines,
+ float& alignmentOffset )
{
const CharacterIndex lastCharacterPlusOne = startIndex + numberOfCharacters;
+ alignmentOffset = MAX_FLOAT;
// Traverse all lines and align the glyphs.
for( Vector<LineRun>::Iterator it = lines.Begin(), endIt = lines.End();
it != endIt;
CalculateHorizontalAlignment( size.width,
horizontalAlignment,
line );
+
+ // Updates the alignment offset.
+ alignmentOffset = std::min( alignmentOffset, line.alignmentOffset );
}
}
CharacterIndex startIndex,
Length numberOfCharacters,
Layout::HorizontalAlignment horizontalAlignment,
- Vector<LineRun>& lines )
+ Vector<LineRun>& lines,
+ float& alignmentOffset )
{
mImpl->Align( size,
startIndex,
numberOfCharacters,
horizontalAlignment,
- lines );
+ lines,
+ alignmentOffset );
}
void Engine::SetDefaultLineSpacing( float lineSpacing )