}
void ReorderLines( const Vector<BidirectionalParagraphInfoRun>& bidirectionalInfo,
- const Vector<LineRun>& lineRuns,
+ Vector<LineRun>& lineRuns,
Vector<BidirectionalLineInfoRun>& lineInfoRuns )
{
// Handle to the bidirectional info module in text-abstraction.
lineIndex = firstLine + numberOfLines;
// Traverse the lines and reorder them
- for( Vector<LineRun>::ConstIterator lineIt = lineRuns.Begin() + firstLine,
+ for( Vector<LineRun>::Iterator lineIt = lineRuns.Begin() + firstLine,
endLineIt = lineRuns.Begin() + firstLine + numberOfLines;
lineIt != endLineIt;
++lineIt )
{
- const LineRun& line = *lineIt;
+ LineRun& line = *lineIt;
+
+ // Sets the paragraph's direction.
+ line.direction = direction;
// Creates a bidirectional info for the line run.
BidirectionalLineInfoRun lineInfoRun;
* Sets the visual to logical map tables.
*
* Any map tables previously set are removed.
+ * It sets the paragraph's direction to each line.
*
* @pre The @p logicalModel needs to have a text set.
* @pre The @p logicalModel needs to have the bidirectional info indices for each paragraph set.
* @pre The @p visualModel needs to have the laid-out lines info set.
*
* @param[in] bidirectionalInfo Vector with the bidirectional infor for each paragraph.
- * @param[in] lineRuns The line runs converted to characters.
+ * @param[in,out] lineRuns The line runs converted to characters.
* @param[out] lineInfoRuns line runs with the visual to logical conversion maps.
*/
void ReorderLines( const Vector<BidirectionalParagraphInfoRun>& bidirectionalInfo,
- const Vector<LineRun>& lineRuns,
+ Vector<LineRun>& lineRuns,
Vector<BidirectionalLineInfoRun>& lineInfoRuns );
/**
lineRun.lineSize.width = layout.length;
lineRun.lineSize.height = layout.ascender + layout.descender;
lineRun.extraLength = layout.wsLengthEndOfLine;
+ lineRun.direction = false;
lines.PushBack( lineRun );
lineRun.lineSize.width = layout.length + ( ( layout.widthAdvanceDiff > 0.f ) ? layout.widthAdvanceDiff : 0.f );
lineRun.lineSize.height = layout.ascender + layout.descender;
lineRun.extraLength = layout.wsLengthEndOfLine;
+ lineRun.direction = false;
lines.PushBack( lineRun );
*/
struct LineRun
{
- GlyphIndex glyphIndex; ///< The initial glyph index.
- Length numberOfGlyphs; ///< The number of glyphs of the run.
- CharacterRun characterRun; ///< The initial character and the number of characters.
- Size lineSize; ///< The size of the line.
- float extraLength; ///< The length of the white spaces at the end of the line.
+ GlyphIndex glyphIndex; ///< The initial glyph index.
+ Length numberOfGlyphs; ///< The number of glyphs of the run.
+ CharacterRun characterRun; ///< The initial character and the number of characters.
+ Size lineSize; ///< The size of the line.
+ float extraLength; ///< The length of the white spaces at the end of the line.
+ CharacterDirection direction; ///< Direction of the first character of the paragraph.
};
} // namespace Text