X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Ftext-view.cpp;h=ea074fa58c4111914c59c3d25d65d024d0d70620;hp=4bee1c284acfe9598edfd87103881035146d1f5e;hb=522fdef5220890d655c8bb777b15574667a931b6;hpb=cacac45f98aade99ec9bda47d126c3fb02eef79a diff --git a/dali-toolkit/internal/text/text-view.cpp b/dali-toolkit/internal/text/text-view.cpp index 4bee1c2..ea074fa 100644 --- a/dali-toolkit/internal/text/text-view.cpp +++ b/dali-toolkit/internal/text/text-view.cpp @@ -103,7 +103,7 @@ Length View::GetGlyphs( GlyphInfo* glyphs, // Otherwise use the given number of glyphs. if( lastLine.ellipsis ) { - numberOfLaidOutGlyphs = lastLine.glyphIndex + lastLine.numberOfGlyphs; + numberOfLaidOutGlyphs = lastLine.glyphRun.glyphIndex + lastLine.glyphRun.numberOfGlyphs; } else { @@ -141,7 +141,7 @@ Length View::GetGlyphs( GlyphInfo* glyphs, LineRun* line = lineBuffer + lineIndex; // Index of the last glyph of the line. - GlyphIndex lastGlyphIndexOfLine = line->glyphIndex + line->numberOfGlyphs - 1u; + GlyphIndex lastGlyphIndexOfLine = line->glyphRun.glyphIndex + line->glyphRun.numberOfGlyphs - 1u; // Add the alignment offset to the glyph's position. for( Length index = 0u; index < numberOfLaidOutGlyphs; ++index ) @@ -156,7 +156,7 @@ Length View::GetGlyphs( GlyphInfo* glyphs, if( lineIndex < numberOfLines ) { line = lineBuffer + lineIndex; - lastGlyphIndexOfLine = line->glyphIndex + line->numberOfGlyphs - 1u; + lastGlyphIndexOfLine = line->glyphRun.glyphIndex + line->glyphRun.numberOfGlyphs - 1u; } } } @@ -317,6 +317,27 @@ float View::GetUnderlineHeight() const return 0.0f; } +Length View::GetNumberOfUnderlineRuns() const +{ + if( mImpl->mVisualModel ) + { + return mImpl->mVisualModel->mUnderlineRuns.Count(); + } + + return 0u; +} + +void View::GetUnderlineRuns( GlyphRun* underlineRuns, + UnderlineRunIndex index, + Length numberOfRuns ) const +{ + if( mImpl->mVisualModel ) + { + mImpl->mVisualModel->GetUnderlineRuns( underlineRuns, + index, + numberOfRuns ); + } +} } // namespace Text